File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 11
11
schedule :
12
12
# Run the second day of every month.
13
13
- cron : " 12 3 2 * *"
14
+ push :
15
+ tags :
16
+ - ' *'
14
17
15
18
env :
16
19
# Change these for your project's URLs
22
25
check-branch :
23
26
runs-on : ubuntu-latest
24
27
steps :
25
- - name : Check if the branch is main
28
+ - name : Check if the branch is main for workflow dispatches
26
29
run : |
27
- if [ "${{ github.ref }}" != "refs/heads/main" ]; then
30
+ if ["${{ github.event_name }}" == "workflow_dispatch"] && [ "${{ github.ref }}" != "refs/heads/main" ]; then
28
31
echo "This workflow can only run on the main branch. Exiting."
29
32
exit 0
30
33
fi
58
61
fi
59
62
- name : Output dev version
60
63
id : output-dev-version
61
- run : echo "dev_version=${{ env.suffix }}${{ env.iteration }}" >> "$GITHUB_OUTPUT"
64
+ # Don't output a dev version if the push was for a tag.
65
+ run : |
66
+ if [ ${{ startsWith(github.ref, 'refs/tags') }} ]; then
67
+ echo "dev_version=''" >> "$GITHUB_OUTPUT"
68
+ else
69
+ echo "dev_version=${{ env.suffix }}${{ env.iteration }}" >> "$GITHUB_OUTPUT"
70
+ fi
62
71
63
72
build :
64
73
name : Build distribution 📦
You can’t perform that action at this time.
0 commit comments