From dc75377bd152ff1463edcd7a935fed223aca3a31 Mon Sep 17 00:00:00 2001 From: Felix Peters Date: Wed, 8 May 2024 13:51:19 +0200 Subject: [PATCH] ci: add semantic release in a dry run mode --- .github/workflows/release.yaml | 34 ++++++++++++++++++++++++++++++++++ .releaserc | 3 +++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/release.yaml create mode 100644 .releaserc diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..8003200 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,34 @@ +name: Release +on: + push: + branches: + - main + repository_dispatch: + types: [semantic-release] + +permissions: + contents: read # for checkout + +jobs: + release: + name: Release + runs-on: ubuntu-latest + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "lts/*" + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release --dry-run --debug --ci diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..c9a35d7 --- /dev/null +++ b/.releaserc @@ -0,0 +1,3 @@ +{ + "branches": ["main"] +}