-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.09 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
on:
push:
branches:
- release
- next
name: Publish
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Prepare repository
run: git fetch --unshallow --tags
- uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'next'
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: bahmutov/npm-install@v1
- run: yarn global add nx
- run: nx affected:lint
- run: nx affected:test
- run: nx affected:build
- name: Publish to GitHub Packages
if: github.ref == 'refs/heads/release' || github.ref == 'refs/heads/next'
run: |
echo '{ "version": "independent", "npmClient": "yarn", "packages": [ "packages/dist/*" ] }' > lerna.json
npx auto shipit
env:
SLACK_WEBHOOK_URL: ${{secrets.NPM_SLACK_WEBHOOK}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}