-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.31 KB
/
publish-next.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
name: Publish Next
on:
push:
branches:
- next
jobs:
ci:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: Read Node.js version to install from `.nvmrc`
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Install required Node.js version
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: "${{ steps.nvm.outputs.NVMRC }}"
registry-url: 'https://registry.npmjs.org'
- name: PNPM install
run: pnpm install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
commit: "chore(release): changesets versioning & publication"
createGithubReleases: true
publish: pnpm run publish:next
title: "Changesets: Versioning & Publication"
version: pnpm exec changeset version --snapshot next --tag next
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}