Skip to content

Commit cf3df35

Browse files
committed
Fix release artefact workflows
1 parent 31953fe commit cf3df35

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

.github/workflows/ios.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
- '.github/workflows/sonarcloud.yml'
1313
- '.cirrus.yml'
1414
- 'README.md'
15-
release:
16-
types: [published]
15+
tags:
16+
- 'v*'
1717

1818
env:
1919
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
@@ -46,8 +46,8 @@ jobs:
4646
shell: bash
4747
id: artifact_name
4848
run: |
49-
if [[ "${{ github.event_name }}" == "release" ]]; then
50-
echo "name=fluidsynth-${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
49+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
50+
echo "name=fluidsynth-${{ github.ref_name }}" >> $GITHUB_OUTPUT
5151
else
5252
echo "name=fluidsynth-${{ github.run_id }}" >> $GITHUB_OUTPUT
5353
fi
@@ -66,7 +66,7 @@ jobs:
6666

6767
# Publish artifacts to GitHub releases (only on release events)
6868
publish-release-ios:
69-
if: github.event_name == 'release' && github.event.action == 'published'
69+
if: github.ref_type == 'tag'
7070
needs:
7171
- ios-build
7272
runs-on: ubuntu-latest
@@ -78,7 +78,7 @@ jobs:
7878
path: ${{ needs.ios-build.outputs.artifact_name }}-iOS
7979
pattern: ${{ needs.ios-build.outputs.artifact_name }}-iOS
8080
merge-multiple: false
81-
81+
8282
- name: Create release archives
8383
run: |
8484
ls -la

.github/workflows/windows.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ on:
1313
- '.github/workflows/ios.yml'
1414
- '.cirrus.yml'
1515
- 'README.md'
16-
release:
17-
types: [published]
16+
tags:
17+
- 'v*'
1818

1919
env:
2020
BUILD_TYPE: RelWithDebInfo
@@ -584,7 +584,7 @@ jobs:
584584
585585
# Publish artifacts to GitHub releases (only on release events)
586586
publish-release:
587-
if: github.event_name == 'release' && github.event.action == 'published'
587+
if: github.ref_type == 'tag'
588588
needs:
589589
- acceptance-test
590590
- msvc-build
@@ -618,7 +618,7 @@ jobs:
618618

619619
# Create announcement PR in website repository
620620
announce-release:
621-
if: github.event_name == 'release' && github.event.action == 'published'
621+
if: github.ref_type == 'tag'
622622
needs: [publish-release]
623623
runs-on: ubuntu-22.04
624624
name: 📢 Announce Release
@@ -630,8 +630,7 @@ jobs:
630630
- name: Generate HTML Release Announcement
631631
run: |
632632
set -e
633-
TAG_NAME="${{ github.event.release.tag_name }}"
634-
RELEASE_NAME="${{ github.event.release.name }}"
633+
TAG_NAME="${{ github.ref_name }}"
635634
VERSION="${TAG_NAME#v}"
636635
DATE="$(date +%Y-%m-%d)"
637636
FILENAME="${DATE}-released-fluidsynth-${VERSION//./-}.md"
@@ -656,6 +655,6 @@ jobs:
656655
target-folder: _posts/
657656
token: ${{ secrets.DEPLOY_API_TOKEN_NEW }}
658657
clean: false
659-
commit-message: Announce FluidSynth ${{ github.event.release.tag_name }}
658+
commit-message: Announce FluidSynth ${{ github.ref_name }}
660659
git-config-name: Fluid Release Announcer
661660
git-config-email: fluid-release-bot@fluidsynth.github.io

0 commit comments

Comments
 (0)