From cc73d10c012ccd33f3fdc954e9360e6875854128 Mon Sep 17 00:00:00 2001 From: Felix Peters Date: Sat, 12 Oct 2024 21:22:21 +0200 Subject: [PATCH] ci: adjust release pipeline --- .github/workflows/release.yaml | 18 +++++++----------- package.json | 6 ++---- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f1046a2..4bfe8d5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,19 +5,14 @@ on: - main repository_dispatch: types: [semantic-release] - permissions: - contents: read # for checkout - + 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 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 @@ -27,8 +22,9 @@ jobs: uses: actions/setup-node@v4 with: node-version: "lts/*" + - name: Install dependencies + run: npm install - name: Release + run: npm run release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release --ci + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index cd2f60b..cb3d2ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "scripts": { - "release-dry-run": "semantic-release --dry-run", + "release-dry-run": "semantic-release --no-ci --dry-run", "release": "semantic-release" }, "devDependencies": { @@ -8,9 +8,7 @@ "semantic-release-replace-plugin": "^1.2.7" }, "release": { - "branches": [ - "main" - ], + "branches": ["main"], "plugins": [ "@semantic-release/commit-analyzer", [