-
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (37 loc) · 1.07 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
name: Publish Package to npmjs
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
name: Linux
runs-on: ubuntu-latest
timeout-minutes: 10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
scope: '@wroud'
cache: 'yarn'
- name: Setup .yarnrc.yml
run: |
yarn config set npmAlwaysAuth true
yarn config set npmPublishRegistry "https://registry.npmjs.org"
yarn config set npmAuthToken $NPM_AUTH_TOKEN
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install modules
run: yarn install --immutable
- name: Build modules
run: yarn build
- name: Run tests
run: yarn test
- name: Publish to npm
run: yarn npm publish --access public --tolerate-republish
working-directory: ./packages/di