Skip to content

Commit 0b3dd00

Browse files
committed
CI Deploy: Warn when not creating a tag
1 parent 508cde8 commit 0b3dd00

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.github/workflows/deploy.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ defaults:
2222

2323
jobs:
2424

25-
get_tag_info:
26-
name: Get tag info
25+
plan:
26+
name: 'Plan: ${{ inputs.release_type}} (tag=${{ inputs.create_tag }})'
2727
runs-on: ubuntu-latest
2828
outputs:
2929
tag_name: ${{ steps.make_tag_info.outputs.TAG_NAME }}
@@ -42,18 +42,18 @@ jobs:
4242
git tag --list | tail -n 20
4343
echo ==========
4444
buildscripts/ci/release/make_tag_name.sh | tee -a "${GITHUB_OUTPUT}"
45-
echo ==========
4645
echo "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
4746
echo ==========
47+
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions
4848
if [[ "${CREATE_TAG}" == 'true' ]]; then
49-
echo "Tag will be created."
49+
echo "::notice ::Tag will be created"
5050
else
51-
echo "Tag will not be created."
51+
echo "::warning ::Tag will NOT be created"
5252
fi
5353
5454
build:
5555
name: Build
56-
needs: get_tag_info
56+
needs: plan
5757
uses: ./.github/workflows/build_all.yml
5858
secrets: inherit
5959
with:
@@ -73,15 +73,15 @@ jobs:
7373
environment: production # requires approval
7474

7575
create_release:
76-
name: 'Create release: ${{ needs.get_tag_info.outputs.tag_name }}'
76+
name: 'Create release: ${{ needs.plan.outputs.tag_name }}'
7777
needs:
78-
- get_tag_info # to access outputs
78+
- plan # to access outputs
7979
- update_learn_playlists
8080
if: ${{ ! failure() && ! cancelled() && inputs.create_tag }} # run even if prior jobs were skipped
8181
runs-on: ubuntu-latest
8282
environment:
8383
name: production # requires approval
84-
url: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ needs.get_tag_info.outputs.tag_name }}
84+
url: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ needs.plan.outputs.tag_name }}
8585
steps:
8686
- name: Clone repository
8787
uses: actions/checkout@v4
@@ -94,7 +94,7 @@ jobs:
9494
buildscripts/ci/release/collate_release_binaries.sh
9595
- name: Create tag # do this as late as possible so we're not left with a useless tag if something fails
9696
env:
97-
TAG_NAME: ${{ needs.get_tag_info.outputs.tag_name }}
97+
TAG_NAME: ${{ needs.plan.outputs.tag_name }}
9898
run: |
9999
int="(0|[1-9][0-9]*)"
100100
version="${int}\.${int}(\.${int})?"
@@ -114,20 +114,20 @@ jobs:
114114
draft: true
115115
prerelease: ${{ inputs.release_type != 'stable' }}
116116
files: release/*
117-
name: ${{ needs.get_tag_info.outputs.release_name }}
118-
tag_name: ${{ needs.get_tag_info.outputs.tag_name }}
117+
name: ${{ needs.plan.outputs.release_name }}
118+
tag_name: ${{ needs.plan.outputs.tag_name }}
119119
fail_on_unmatched_files: true
120120
generate_release_notes: false
121121

122122
notify_users:
123123
name: Notify users
124124
needs:
125-
- get_tag_info # to access outputs
125+
- plan # to access outputs
126126
- create_release
127127
if: ${{ github.repository == 'musescore/MuseScore' && ! failure() && ! cancelled() && needs.create_release.result == 'success' }}
128128
uses: ./.github/workflows/update_release_info.yml
129129
secrets: inherit
130130
with:
131131
mode: ${{ inputs.release_type == 'stable' && 'stable' || 'testing' }}
132-
tag: ${{ needs.get_tag_info.outputs.tag_name }}
132+
tag: ${{ needs.plan.outputs.tag_name }}
133133
environment: production # requires approval

0 commit comments

Comments
 (0)