-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 2.02 KB
/
build-deploy-obol-sdk.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
name: Publish Obol-SDK to NPM
on:
pull_request:
types:
- closed
workflow_dispatch:
jobs:
build:
if: (github.event.pull_request.merged == true && github.event.pull_request.head.label.name == 'release') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false # Required to make GitHub forget this checkout for the next step
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
scope: '@obolnetwork'
- name: Configure git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/[email protected]
############# TAG RELEASE ##############
- name: "Push tag v${{ steps.package-version.outputs.current-version }}"
uses: rickstaa/action-create-tag@v1
id: tag_version
with:
tag: "v${{ steps.package-version.outputs.current-version }}"
############# GITHUB RELEASE ##############
- name: "Create a GitHub release v${{ steps.package-version.outputs.current-version }}"
uses: ncipollo/release-action@v1
with:
tag: "v${{ steps.package-version.outputs.current-version }}"
name: "Release v${{ steps.package-version.outputs.current-version }}"
body: |
## Release notes:
${{ steps.extract-release-notes.outputs.release_notes }}
############# NPM RELEASE ##############
- run: yarn install --frozen-lockfile
- run: yarn run build
- run: yarn run generate-typedoc
- run: yarn run npm:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0