Skip to content

Commit

Permalink
Use manual workflow_dispatch to build release candidates.
Browse files Browse the repository at this point in the history
  • Loading branch information
marceltaeumel committed Jul 30, 2021
1 parent 3390650 commit d4945fa
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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/[email protected]
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 }}

0 comments on commit d4945fa

Please sign in to comment.