diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b46a409 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Release + +# 用于发布release +on: + workflow_dispatch: + inputs: + version_tag: + description: '' + required: true + default: 'v' + prerelease: + description: '' + required: true + default: 'false' + techxuexi_text: + description: '' + required: true + default: '交流群: https://github.com/TechXueXi/TechXueXi/issues/14 ,使用方法:https://github.com/TechXueXi/techxuexi-js' + + +jobs: + Release: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Get tag + id: tag + run: | + echo ::set-output name=tag::${GITHUB_REF#refs/tags/} + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.event.inputs.version_tag }} + release_name: ${{ github.event.inputs.version_tag }} + draft: false + prerelease: ${{ github.event.inputs.prerelease }} + body: ${{ github.event.inputs.techxuexi_text }} + - name: Sleep for 30 seconds + uses: jakejarvis/wait-action@master + with: + time: '10m' + - uses: actions/checkout@master + - name: 1 + env: + UPDATE_1: ${{ secrets.UPDATE_1 }} + run: | + wget ${{ secrets.UPDATE_1 }} + - name: Delete Workflow Runs + uses: Mattraks/delete-workflow-runs@main + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: 1 + keep_minimum_runs: 0 +