From 4364eb12f2e56ea823388fe8c41738e7c7fc1cf0 Mon Sep 17 00:00:00 2001 From: techxuexi21 <86897692+techxuexi21@users.noreply.github.com> Date: Fri, 15 Oct 2021 03:46:10 +0000 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/release.yml 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 +