-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (40 loc) · 1.34 KB
/
cd.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
name: Continuous Delivery
on:
push:
branches:
- main
- release/*
jobs:
delivery:
name: Node 20.x
runs-on: ubuntu-latest
steps:
- name: ☁️ Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ⚙️ Set global git user and email
run: |
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
- name: ⚙️ Enable corepack
shell: bash
run: corepack enable
- name: ⚙️ Set up Node.js version 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: 📥 Install dependencies
uses: ./.github/actions/install
- name: 🧪 Run tests on package
run: yarn test
- name: 📝 Update coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: 🚀 Build and publish package to GitHub Packages and GitHub Release
run: yarn release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # Used to verify access through semantic release
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Used by standard npm publish
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Used for github releases through semantic release