-
Notifications
You must be signed in to change notification settings - Fork 108
48 lines (38 loc) · 1.26 KB
/
publish-npm-packages.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
name: Publish npm packages
on:
# manually triggering the workflow if desired
workflow_dispatch:
# trigger this workflow when the CI workflow is completed
workflow_run:
workflows: ["Continuous Integration"]
branches: [main]
types:
- completed
jobs:
publish-npm-packages:
# check that the CI workflow was actually successful
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/checkout@v3
- name: Setup Pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: pnpm install
- name: Install Doppler CLI for env variables
uses: dopplerhq/cli-action@v2
- run: doppler run -- pnpm build
env:
DOPPLER_TOKEN: ${{ secrets.DOPPLER_PRODUCTION_ENV_TOKEN }}
- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}" && pnpm config set 'git-checks' false
env:
NPM_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
- name: create and publish versions
run: pnpm --filter !vs-code-extension publish -r