File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99jobs :
1010 publish-stable :
1111 runs-on : ubuntu-latest
12+ environment : marketplace-production
1213 permissions :
1314 contents : write
1415
2930 test "$package_name" = "zoo-code"
3031 test "$publisher" = "ZooCodeOrganization"
3132
33+ - name : Validate publish ref
34+ run : |
35+ if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ] && [ "$GITHUB_REF_NAME" != "main" ]; then
36+ echo "Manual stable publishes must run from main, not ${GITHUB_REF_NAME}."
37+ exit 1
38+ fi
39+
3240 - name : Validate release tag
3341 if : github.event_name == 'push'
3442 run : |
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ concurrency:
1515jobs :
1616 publish-prerelease :
1717 runs-on : ubuntu-latest
18+ environment : marketplace-prerelease
1819
1920 steps :
2021 - name : Checkout code
3334 test "$package_name" = "zoo-code"
3435 test "$publisher" = "ZooCodeOrganization"
3536
37+ - name : Validate publish ref
38+ run : |
39+ if [ "$GITHUB_REF_NAME" != "main" ]; then
40+ echo "Pre-release publishes must run from main, not ${GITHUB_REF_NAME}."
41+ exit 1
42+ fi
43+
3644 - name : Set pre-release version
3745 id : version
3846 env :
You can’t perform that action at this time.
0 commit comments