From 2a405da273b68bb19e9bf1f9064bb0dd8531b2cb Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Wed, 7 Feb 2024 10:16:40 +0100 Subject: [PATCH] ci: update actions (#77) * ci: update actions * ci: no separate tags job --- .github/workflows/release.yml | 38 ++++++++++++++--------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58ba7cc..7932aec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,19 +5,31 @@ on: branches: - master +concurrency: ${{ github.workflow }}-${{ github.ref }} + jobs: release: name: Release runs-on: ubuntu-latest steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.GH_APP_ID }} + private_key: ${{ secrets.GH_PRIVATE_KEY }} + - name: Checkout Repo - uses: actions/checkout@master + uses: actions/checkout@v4 with: # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits fetch-depth: 0 + token: ${{ steps.generate_token.outputs.token }} - name: Setup Node.js - uses: actions/setup-node@master + uses: actions/setup-node@v4 + with: + node-version: 20 - name: Install Dependencies run: npm ci @@ -27,26 +39,6 @@ jobs: with: # This expects you to have a script called release which does a build for your packages and calls changeset publish publish: npm run release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - tags: - name: Create tags - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - - name: Generate token - id: generate_token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.GH_APP_ID }} - private_key: ${{ secrets.GH_PRIVATE_KEY }} - - - name: Tag Release - uses: tpluscode/action-autotag@min-version-21 - with: - tag_prefix: v env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}