From e72a54a7dfdf55e3ab893b22c6f3e5b8b0e24d83 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 29 Aug 2024 15:35:59 -0400 Subject: [PATCH] ci: use CFA on GHA for releases --- .github/workflows/ci.yaml | 17 +++++++++++++++++ .releaserc.json | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 .releaserc.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8022808..823578c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,3 +28,20 @@ jobs: run: yarn test --maxWorkers=2 - name: Run Linter run: yarn prettier:check + + release: + runs-on: ubuntu-latest + needs: build + if: github.ref == 'refs/heads/main' + environment: npm + permissions: + id-token: write + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + persist-credentials: false + - uses: continuousauth/action@4396fa3eb7c9790548b9e2b6e4f527df5b861add # v1.0.1 + with: + project-id: ${{ secrets.CFA_PROJECT_ID }} + secret: ${{ secrets.CFA_SECRET }} + npm-token: ${{ secrets.NPM_TOKEN }} diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..152aec1 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,9 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@continuous-auth/semantic-release-npm", + "@semantic-release/github" + ], + "branches": ["main"] +}