From 838dba0f274634ee8065e45bdbd8a17b2096e507 Mon Sep 17 00:00:00 2001 From: Jacob Veal Date: Thu, 23 Mar 2023 19:53:27 -0500 Subject: [PATCH] build: add release workflow --- .github/workflows/release.yaml | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..b550128 --- /dev/null +++ b/.github/workflows/release.yaml @@ -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 }}