-
Notifications
You must be signed in to change notification settings - Fork 59
41 lines (39 loc) · 1.04 KB
/
publish.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
name: Release
on:
push:
branches:
- main
- 'pre-release-beta/**'
- 'beta/**'
- 'prototype-beta/**'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
publish-npm:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: yarn
- name: Create .npmrc file
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
always-auth = true
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
publish: yarn release
version: yarn version-packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}