-
Notifications
You must be signed in to change notification settings - Fork 142
51 lines (43 loc) · 1.23 KB
/
release.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
name: Release
on:
push:
branches:
# semantic-release valid branches
- '+([0-9])?(.{+([0-9]),x}).x'
- 'main'
- 'next'
- 'next-major'
- 'beta'
- 'alpha'
concurrency:
group: release
cancel-in-progress: false
permissions:
contents: write # to be able to publish a GitHub release
id-token: write # to enable use of OIDC for npm provenance
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
jobs:
publish:
name: Publish NPM package
runs-on: ubuntu-latest
# Avoid publishing in forks
if: github.repository == 'testing-library/eslint-plugin-testing-library'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build
- name: Release new version
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}