Skip to content

更新 version.json

更新 version.json #4

name: Auto Prerelease on Version Update
on:
push:
paths:
- 'res/version.json'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js 20
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Get current version
id: get_version
run: |
echo "::set-output name=vn::$(jq -r '.vn' res/version.json)"
echo "::set-output name=vn_::$(jq -r '.vn_' res/version.json)"
shell: bash
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'v${{ steps.get_version.outputs.vn_ }}'
release_name: 'auto_pre_${{ steps.get_version.outputs.vn_ }}'
body: 'env_num_${{ steps.get_version.outputs.vn }}'
draft: false
prerelease: true
# generate_release_notes: true