-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (77 loc) · 2.64 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: SDK Release
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# with:
# fetch-depth: "0"
- uses: actions/setup-node@v2
with:
node-version: 16
github_token: ${{secrets.GITHUB_TOKEN}}
npm_token: ${{secrets.NPM_TOKEN}}
- name: Bootstrap
run: |
yarn install --ignore-engines
yarn bootstrap
- name: Tests
run: |
yarn lint
yarn build
yarn test
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{secrets.GPG_PRIVATE_KEY}}
- name: Git & Npm configuration
run: |
git config --global user.email "[email protected]"
git config --global user.name "@$GITHUB_ACTOR"
git config --global commit.gpgsign true
git config --global gpg.program gpg2
git config --global user.signingkey 58DBEF1CA88E6CB8
echo "@windingtree:https://registry.npmjs.org/" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Initializing release version
run: |
echo "Processing the branch: ${{github.ref_name}}"
git stash
npx lerna version --conventional-commits --sign-git-commit --sign-git-tag --yes
- name: Publish release
run: |
yarn build
npx lerna publish from-git --yes
# on:
# repository_dispatch:
# types: [release_to_npm]
# jobs:
# release:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-node@v1
# with:
# node-version: 12
# - name: Package bootstrap
# run: yarn run exec --scope @windingtree/${{ github.event.client_payload.packageName }} yarn install
# - name: Run tests
# run: yarn run exec --scope @windingtree/${{ github.event.client_payload.packageName }} yarn run test
# - name: Build the package
# run: yarn run exec --scope @windingtree/${{ github.event.client_payload.packageName }} yarn run build
# - uses: actions/setup-node@v1
# with:
# node-version: 12
# registry-url: "https://registry.npmjs.org"
# scope: "@windingtree"
# - name: Publish to npmjs.org
# run: yarn run exec --scope @windingtree/${{ github.event.client_payload.packageName }} npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}