This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from BitGo/ci-release
build: add release workflow
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
# Only allow one release workflow to execute at a time, since each release | ||
# workflow uses shared resources (git tags, package registries) | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
if: github.repository_owner == 'BitGo' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: "pnpm" | ||
node-version: lts/* | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Compile TypeScript | ||
run: pnpm build | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
- name: Release | ||
run: pnpm dlx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |