-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (45 loc) · 1.33 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
# cSpell:ignore preid
name: Publish
on:
push:
branches:
- main
- release/*
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
# On changes to main, publish to the "next" dist tag
publish-next:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_KEY }}
- name: Prepare ✅
uses: ./.github/actions/prepare
- name: Build 🔧
run: npm run build
- name: Publish 🚀
run: npx lerna publish --conventional-commits --conventional-bump-prerelease --create-release github --preid next --dist-tag next --yes
# On changes to release branches, publish to the "latest" dist tag
publish:
if: startsWith(github.ref, 'refs/heads/release/')
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_KEY }}
- name: Prepare ✅
uses: ./.github/actions/prepare
- name: Build 🔧
run: npm run build
- name: Publish 🚀
run: npx lerna publish --conventional-commits --conventional-graduate --create-release github --yes