-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
49 lines (43 loc) · 1.05 KB
/
release-canary.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
# .github/release.yml
name: Release on npm (canary)
on:
push:
branches:
- "master"
paths:
- "src/**"
- ".github/workflows/release-canary.yml"
jobs:
build_and_publish:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: |
yarn install
- name: Build
run: |
yarn clean
yarn build
- name: Set version
run: |
npm --no-git-tag-version version minor
npm --no-git-tag-version version $(npm pkg get version | sed 's/"//g')-canary.$(date +'%Y%m%dT%H%M%S')
- id: publish
name: Publish to NPM
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: false
tag: canary
provenance: true