-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (48 loc) · 1.37 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
42
43
44
45
46
47
48
49
50
51
name: Publish
# RELEASE PROCESS
#
# === Manual ===
#
# 1. Document human readable changes in CHANGES
# 2. Bump package version
# 3. Create a PR to develop branch
# 4. Edit the current draft release notes
# 5. If not already set, use `v<new version>` as a tag, and select develop as target branch
#
# === Automated ===
#
# 1. Extract release notes tag that was published
# 2. Ensure release notes tag match what's in CHANGES
# 5. Publish package
# 6. Push latest release source code to master using release title as the commit message
on:
release:
types: [published]
jobs:
upload:
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Set release notes tag
run: |
export RELEASE_NAME_VERSION=${{ github.event.release.name }}
echo "RELEASE_NAME_VERSION=${RELEASE_NAME_VERSION}" >> $GITHUB_ENV
- name: Ensure new version is also set in CHANGES.md
run: |
grep --regexp "${RELEASE_NAME_VERSION}" CHANGES.md
- name: Setup
run: |
yarn
- name: Build
run: |
yarn build
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn publish --access public