From 8f39e72a6fa62872428d15b0352eb288f242fa86 Mon Sep 17 00:00:00 2001 From: Peter Makowski Date: Wed, 24 Jan 2024 09:52:30 +0100 Subject: [PATCH 1/2] ci: add release workflow --- .github/release-drafter.yml | 18 ------------------ .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 18 deletions(-) delete mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index f2a886a62..000000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,18 +0,0 @@ -name-template: "v$NEXT_PATCH_VERSION" -tag-template: "v$NEXT_PATCH_VERSION" -categories: - - title: "🚀 Features" - label: "Feature 🎁" - - title: "💣 Breaking Change" - label: "Breaking Change 💣" - - title: "🐛 Bug Fixes" - label: "Bug 🐛" - - title: "📝 Documentation" - label: "Documentation 📖" - - title: "🔨 Maintenance" - label: "Maintenance 🔨" -change-template: "- $TITLE (#$NUMBER)" -template: | - ## v$NEXT_PATCH_VERSION - - $CHANGES diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..1d211a347 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release +on: + push: + branches: + - main + +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: Install dependencies + run: yarn install + - name: Build + run: yarn build + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release From 164de24396856da5dbe4519ba499fdcd7baefec1 Mon Sep 17 00:00:00 2001 From: Peter Makowski Date: Wed, 24 Jan 2024 10:04:09 +0100 Subject: [PATCH 2/2] remove redundant permissions - update actions versions --- .github/workflows/release.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d211a347..8c101546a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,9 +4,6 @@ on: branches: - main -permissions: - contents: read # for checkout - jobs: release: name: Release @@ -18,11 +15,11 @@ jobs: id-token: write # to enable use of OIDC for npm provenance steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: "lts/*" - name: Install dependencies