-
Notifications
You must be signed in to change notification settings - Fork 93
55 lines (51 loc) · 1.67 KB
/
beta-release.yaml
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
name: Beta release
on:
pull_request:
types:
- closed
branches:
- develop
defaults:
run:
working-directory: balancer-js
jobs:
build_and_release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: develop
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/cache@v2
id: cache
with:
path: "**/node_modules"
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- run: yarn --immutable
if: steps.cache.outputs.cache-hit != 'true'
- name: Generate Typechain
run: yarn typechain:generate
- env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
run: |
echo -n "$SIGNING_KEY" | base64 --decode | gpg --import
git config --global user.name "johngrantuk"
git config --global user.email "[email protected]"
git config user.signingkey 5D1644BB7D087635E36B06C1ABCBFFAEE5EAEE77
git config gpg.program /usr/bin/gpg
yarn version --prerelease --preid beta --no-git-tag-version
export NEW_VERSION=$(jq -r '.version' package.json)
git commit -S -am "chore: version bump v$NEW_VERSION"
git tag "v$NEW_VERSION"
git remote set-url origin "https://johngrantuk:[email protected]/balancer-labs/balancer-sdk"
git push
yarn build
yarn publish --non-interactive --tag beta
env:
CI: true