-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (32 loc) · 1.17 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
name: Release
on:
push:
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4 # v4
- uses: ./.github/workflows/setup
- name: Update npm config
run: npm config set '//registry.npmjs.org/:_authToken' '${NPM_TOKEN}'
# Create a pull request with all of the package versions and
# changelogs updated and when there are new changesets on master,
# the PR will be updated. When the PR is merged the packages are
# published to NPM automatically.
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: pnpm run version
publish: pnpm publish -r
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_PULL_REQUEST }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}