-
Notifications
You must be signed in to change notification settings - Fork 19
47 lines (40 loc) · 1.26 KB
/
release.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
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
runs-on: ubuntu-latest
steps:
# using `v1` because of: https://github.com/actions/checkout/issues/246
- uses: actions/checkout@v1
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run ci
- name: npm auth setup
# we are using `lerna` to publish which does not use `pnpm`
# so the auth setup is done with `npm` commands instead of `pnpm`
# note we are using `>` instead of `>>` and replace the whole `.npmrc` contents
run: |
npm logout || true
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: ignore lerna error on modified .npmrc
run: git update-index --assume-unchanged .npmrc
- name: Publish to NPM
run: pnpm run release:publish
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
files: packages/*/*.vsix
fail_on_unmatched_files: true