From e57d6da72f76ed3cd1c060b6239ec07f7ecc2f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFk=20Fekka=C3=AF?= Date: Thu, 6 Feb 2025 17:51:27 +0100 Subject: [PATCH] ci --- .github/actions/ci-setup/action.yml | 2 +- .github/workflows/publish.yml | 34 ++++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/actions/ci-setup/action.yml b/.github/actions/ci-setup/action.yml index 8af151a4..83ff18b3 100644 --- a/.github/actions/ci-setup/action.yml +++ b/.github/actions/ci-setup/action.yml @@ -16,5 +16,5 @@ runs: cache: 'pnpm' - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install --no-frozen-lockfile shell: bash \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e113e799..e7bd267e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,14 +2,31 @@ name: Release on: push: - branches: - - main + branches: ['main'] + paths: + - '.changeset/**' + - 'CHANGELOG.md' + pull_request: + branches: ['main'] + paths: + - '.changeset/**' + - 'CHANGELOG.md' + workflow_dispatch: -concurrency: ${{ github.workflow }}-${{ github.ref }} +permissions: + contents: write + pull-requests: write + +concurrency: + group: release-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: + coverage: + uses: ./.github/workflows/coverage.yml + release: - name: Release + needs: [coverage] runs-on: ubuntu-latest environment: production steps: @@ -18,7 +35,14 @@ jobs: with: fetch-depth: 0 - - uses: ./.github/actions/ci-setup + - name: Setup Build Environment + uses: ./.github/actions/ci-setup + + - name: Check for changesets + run: pnpm changeset status --since=main + + - name: Build + run: pnpm run build - name: Create Release Pull Request or Publish id: changesets