@@ -18,37 +18,17 @@ jobs:
18
18
node-version : 18
19
19
20
20
release :
21
+ needs : [test]
21
22
concurrency : release
22
23
runs-on : ubuntu-latest
23
- needs : [test]
24
- if : github.ref_name == 'main'
25
- env :
26
- # Value must match in the test job.
27
- NODE_VERSION : 18
24
+ # Release if:
25
+ # - the repo's owner is Ocado Tech.
26
+ # - a change is made to the default branch.
27
+ if : |
28
+ github.repository_owner_id == 2088731 &&
29
+ github.ref_name == github.event.repository.default_branch
28
30
steps :
29
- - uses : actions/checkout@v4
30
- with :
31
- token : ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
32
- fetch-depth : 0
33
-
34
- - name : 🌐 Set up Node ${{ env.NODE_VERSION }}
35
- uses : actions/setup-node@v4
36
- with :
37
- node-version : ${{ env.NODE_VERSION }}
38
-
39
- - name : 🛠 Install Dependencies
40
- run : |
41
- npm install --global npm
42
- npm install --global \
43
- semantic-release@^20.1.1 \
44
- @semantic-release/git@^10.0.1 \
45
- @semantic-release/changelog@^6.0.2
46
-
47
31
- name : 🚀 Publish Semantic Release
48
- env :
49
- GH_TOKEN : ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
50
- GIT_AUTHOR_NAME : cfl-bot
51
- GIT_AUTHOR_EMAIL :
[email protected]
52
- GIT_COMMITTER_NAME : cfl-bot
53
- GIT_COMMITTER_EMAIL :
[email protected]
54
- run : npx semantic-release
32
+ uses : ocadotechnology/codeforlife-workspace/.github/actions/github/release@main
33
+ with :
34
+ cfl-bot-gh-token : ${{ secrets.CFL_BOT_GH_TOKEN }}
0 commit comments