99 push :
1010 branches :
1111 - main
12- - next
13- - experimental
12+ - alpha
13+ - beta
1414
1515env :
1616 CI : true
1919 GITHUB_ACTOR : ${{ github.actor }}
2020 GITHUB_TOKEN : ${{ github.token }}
2121 NPM_TOKEN : ${{ secrets.STORM_BOT_NPM_TOKEN }}
22- CARGO_REGISTRY_TOKEN : ${{ secrets.STORM_BOT_CARGO_TOKEN }}
2322
2423jobs :
2524 start :
3029 id-token : write
3130 if :
3231 github.repository == 'storm-software/monorepo-template' && (github.ref ==
33- ' refs/heads/main' || github.ref == 'refs/heads/next ' || github.ref ==
34- ' refs/heads/experimental ' )
32+ ' refs/heads/main' || github.ref == 'refs/heads/alpha ' || github.ref ==
33+ ' refs/heads/beta ' )
3534 steps :
3635 - name : Send notification - Deployment started
3736 uses : storm-software/action-notify@main
5453 discord-webhook : ${{ secrets.STORM_BOT_DISCORD_WEBHOOK}}
5554
5655 process :
57- name : " Continuous Integration "
56+ name : " Release "
5857 if :
5958 always() && !cancelled() && !contains(needs.*.result, 'failure') &&
6059 github.event.pull_request.draft == false
6564 needs :
6665 - start
6766 steps :
67+ - name : Checkout [Pull Request]
68+ uses : actions/checkout@v4
69+ if : ${{ github.event_name == 'pull_request' }}
70+ with :
71+ # By default, PRs will be checked-out based on the Merge Commit, but we want the actual branch HEAD.
72+ ref : ${{ github.event.pull_request.head.sha }}
73+ # We need to fetch all branches and commits so that Nx affected has a base to compare against.
74+ fetch-depth : 0
75+ token : ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
76+ persist-credentials : false
77+
78+ - name : Checkout `main` branch
79+ uses : actions/checkout@v4
80+ if : ${{ github.event_name != 'pull_request' }}
81+ with :
82+ # We need to fetch all branches and commits so that Nx affected has a base to compare against.
83+ fetch-depth : 0
84+ token : ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
85+ persist-credentials : false
86+
6887 - name : Setup workspace
6988 uses : storm-software/action-devenv-setup@main
7089 with :
@@ -79,27 +98,23 @@ jobs:
7998 uses : nrwl/nx-set-shas@v4
8099 with :
81100 main-branch-name : main
82- workflow-id : ci .yml
101+ workflow-id : release .yml
83102 set-environment-variables-for-job : true
84103 error-on-no-successful-workflow : true
85104
86105 - name : Release repository updates
87106 run :
88- devenv shell release ${{ steps.setSHAs.outputs.base }} ${{
89- steps.setSHAs.outputs.head }}
107+ devenv shell release ${{ steps.setSHAs.outputs.base }} ${{ steps.setSHAs.outputs.head }}
90108 env :
91109 NX_BASE : ${{ steps.setSHAs.outputs.base }}
92110 NX_HEAD : ${{ steps.setSHAs.outputs.head }}
93111 GITHUB_ACTOR : ${{ github.actor }}
94112 GITHUB_TOKEN : ${{ github.token }}
95- GH_TOKEN : ${{ github.token }}
96113 STORM_BOT_GITHUB_TOKEN : ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
97- NPM_TOKEN : ${{ secrets.STORM_BOT_NPM_TOKEN }}
98- CARGO_REGISTRY_TOKEN : ${{ secrets.STORM_BOT_CARGO_TOKEN }}
99- CLOUDFLARE_API_TOKEN : ${{ secrets.STORM_BOT_CLOUDFLARE_TOKEN }}
100- STORM_BOT : stormie-bot
101114 STORM_WORKSPACE_ROOT : ${{ github.workspace }}
102115 STORM_REPOSITORY : ${{ github.repositoryUrl }}
116+ NPM_TOKEN : ${{ secrets.STORM_BOT_NPM_TOKEN }}
117+ CLOUDFLARE_API_TOKEN : ${{ secrets.STORM_BOT_CLOUDFLARE_TOKEN }}
103118 TAG : ${{ inputs.tag }}
104119
105120 success :
0 commit comments