-
Notifications
You must be signed in to change notification settings - Fork 564
64 lines (55 loc) · 1.75 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
52
53
54
55
56
57
58
59
60
61
62
63
64
name: 🕊 Release
on:
push:
branches:
- release
- "release-*"
- "!release-experimental"
- "!release-experimental-*"
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
CI: true
jobs:
release:
name: Release
if: github.repository == 'reach/reach-ui'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: pnpm/action-setup@v2.2.2
with:
version: 7
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Build Packages
run: pnpm build
- name: Setup npm auth
run: |
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
# This action has two responsibilities. The first time the workflow runs
# (initial push to a `release-*` branch) it will create a new branch and
# then open a PR with the related changes for the new version. After the
# PR is merged, the workflow will run again and this action will build +
# publish to npm.
- name: PR / Publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm run version
commit: "chore: Update version for release"
title: "chore: Update version for release"
publish: pnpm release
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}