Skip to content

Commit

Permalink
@axmol-bot [release 1.8.0]
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Jul 14, 2023
1 parent 3fa9c4e commit 5c1b616
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: build

on:
push:
paths-ignore:
'.github/workflows/dist.yml'

jobs:
win64:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
dist:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
RELEASE_TAG_NAME: 'v${{github.event.inputs.version}}'

if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.inputs.version != '' }}

Expand All @@ -32,15 +30,18 @@ jobs:
- uses: actions/checkout@v3

- name: Check release version
shell: pwsh
id: check_ver
shell: pwsh
run: |
$commit_msg = "$(git show -s --format=%s)"
echo "commit_msg: $commit_msg"
$matchInfo = [Regex]::Match($commit_msg, '\[release\s(\d+\.)+(-)?(\*|\d+)\]')
if ($matchInfo.Success) { $matchInfo = [Regex]::Match($matchInfo.Value, '(\d+\.)+(-)?(\*|\d+)') }
$release_ver = if($matchInfo.Success) { $matchInfo.Value } else { '${{github.event.inputs.version}}' }
echo "release_ver=$release_ver" >> $GITHUB_OUTPUT
echo "release_tag=v$release_ver" >> $GITHUB_OUTPUT
if (!$matchInfo.Success) { $matchInfo = [Regex]::Match('${{github.event.inputs.version}}', '(\d+\.)+(-)?(\*|\d+)') }
$release_ver = if($matchInfo.Success) { $matchInfo.Value } else { '' }
echo "release_ver=$release_ver"
echo "release_ver=$release_ver" >> ${env:GITHUB_OUTPUT}
echo "release_tag=v$release_ver" >> ${env:GITHUB_OUTPUT}
- name: Download artifacts from workflow build
if: ${{ steps.check_ver.outputs.release_ver != '' }}
Expand Down

0 comments on commit 5c1b616

Please sign in to comment.