Skip to content

Commit 8554b37

Browse files
fix: update release yaml to follow semantic release gha
Ticket: WP-5314
1 parent 525671d commit 8554b37

File tree

1 file changed

+54
-20
lines changed

1 file changed

+54
-20
lines changed

.github/workflows/release.yaml

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,66 @@
22
name: Release
33

44
permissions:
5-
# Required by AWS CodeArtifact
6-
id-token: write
7-
85
# Required by semantic-release
96
contents: write
107
pull-requests: write
118
issues: write
129

1310
on:
14-
push:
15-
branches:
16-
- master
17-
- next
18-
- next-major
19-
- beta
20-
- alpha
21-
- "[0-9]+.[0-9]+.x"
22-
- "[0-9]+.x"
11+
workflow_dispatch:
12+
inputs:
13+
dry_run:
14+
description: 'Dry run (no actual release)'
15+
required: false
16+
type: boolean
17+
default: false
2318

2419
jobs:
2520
release:
26-
uses: BitGo/gha-release-typescript-library/.github/workflows/release.yml@v3
27-
with:
28-
lint-node-version: '22.x'
29-
test-node-versions: '["22.x"]'
30-
release-node-version: '22.x'
31-
build-command: 'yarn build'
32-
test-command: 'yarn test'
33-
allow-postinstall-scripts: false
21+
name: Release
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
persist-credentials: false
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '22.x'
34+
cache: 'yarn'
35+
36+
- name: Cache dependencies
37+
uses: actions/cache@v3
38+
id: node-modules-cache
39+
with:
40+
path: '**/node_modules'
41+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
42+
restore-keys: |
43+
${{ runner.os }}-modules-
44+
45+
- name: Install dependencies
46+
if: steps.node-modules-cache.outputs.cache-hit != 'true'
47+
run: yarn install
48+
49+
- name: Build
50+
run: yarn build
51+
52+
- name: Test
53+
run: yarn test
54+
env:
55+
NODE_OPTIONS: '--max-old-space-size=4096'
56+
MASTER_BITGO_EXPRESS_KEYPATH: ./test-ssl-key.pem
57+
MASTER_BITGO_EXPRESS_CRTPATH: ./test-ssl-cert.pem
58+
MTLS_ENABLED: true
59+
MTLS_REQUEST_CERT: true
60+
MTLS_REJECT_UNAUTHORIZED: false
61+
KMS_URL: 'https://localhost:3000/'
62+
63+
- name: Release
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
DRY_RUN: ${{ github.event.inputs.dry_run }}
67+
run: npx semantic-release${DRY_RUN == 'true' && ' --dry-run' || ''}

0 commit comments

Comments
 (0)