diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 1dbbb6bcbd..0c4656f275 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -22,6 +22,16 @@ on: paths-ignore: - '**.md' - '**HowToBuild' + workflow_dispatch: + inputs: + input-tag: + description: "New release candidate: input tag" + required: true + default: YYYYMMDDHHMM + output-tag: + description: "New release candidate: output tag" + required: true + default: release-candidate jobs: build: @@ -57,8 +67,15 @@ jobs: MODE: ${{ matrix.mode }} steps: - name: Checkout files + if: github.event_name != 'workflow_dispatch' uses: actions/checkout@v2 + - name: Checkout files for new release candidate + if: github.event_name == 'workflow_dispatch' + uses: actions/checkout@v2 + with: + ref: refs/tags/${{ github.event.inputs.input-tag }} + - name: Restore build cache uses: actions/cache@v2 with: @@ -101,3 +118,15 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} body: ${{ github.event.head_commit.message }} + + - name: Deploy artifact as new release candidate + uses: ncipollo/release-action@v1.8.6 + if: github.event_name == 'workflow_dispatch' + with: + prerelease: true # release candidate + allowUpdates: true + replacesArtifacts: true + artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: github.event.inputs.output-tag + body: ${{ github.event.head_commit.message }}