-
Notifications
You must be signed in to change notification settings - Fork 22
54 lines (48 loc) · 1.43 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Main
on:
push:
paths-ignore:
- '**/*.md'
- '**/*.code-*'
- '.vscode/**'
- '.devcontainer.json'
workflow_dispatch:
jobs:
test:
uses: ocadotechnology/codeforlife-workspace/.github/workflows/test-javascript-code.yaml@main
secrets: inherit
with:
# Cannot be set with an env var. Value must match in the release job.
node-version: 18
release:
concurrency: release
runs-on: ubuntu-latest
needs: [test]
if: github.ref_name == 'main'
env:
# Value must match in the test job.
NODE_VERSION: 18
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
fetch-depth: 0
- name: 🌐 Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: 🛠 Install Dependencies
run: |
npm install --global npm
npm install --global \
semantic-release@^20.1.1 \
@semantic-release/git@^10.0.1 \
@semantic-release/changelog@^6.0.2
- name: 🚀 Publish Semantic Release
env:
GH_TOKEN: ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: cfl-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: cfl-bot
GIT_COMMITTER_EMAIL: [email protected]
run: npx semantic-release