From 4c554487d0c04ae3ba8e83acaa2941b4ad113f1d Mon Sep 17 00:00:00 2001 From: Erik Koopmans Date: Sun, 30 Jun 2024 17:46:14 -0400 Subject: [PATCH] chore: Add release action (#700) --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ .nvmrc | 1 + 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .nvmrc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..79eac9a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Release +on: + push: + branches: + - main +jobs: + release: + timeout-minutes: 2 + runs-on: ubuntu-latest + steps: + - name: Create GH Token + uses: actions/create-github-app-token@v1 + id: gh-token + with: + app-id: ${{ vars.GH_TOKEN_APP_ID }} + private-key: ${{ secrets.GH_TOKEN_APP_PRIVATE_KEY }} + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + - name: Install Dependencies + run: npm ci + - name: Build + run: npm run build + - name: Semantic Release + uses: BrightspaceUI/actions/semantic-release@main + with: + GITHUB_TOKEN: ${{ steps.gh-token.outputs.token }} + NPM: true + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..b6a7d89 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +16