ci: run release only after successful CI

This commit is contained in:
Erik Kotsiuba
2026-04-24 20:46:40 +02:00
parent 1877cfac01
commit 0bf9902834
+7 -7
View File
@@ -1,7 +1,11 @@
name: Release name: Release
on: on:
push: workflow_run:
workflows:
- CI
types:
- completed
branches: branches:
- main - main
@@ -13,12 +17,14 @@ permissions:
jobs: jobs:
release: release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ github.event.workflow_run.head_sha }}
fetch-depth: 0 fetch-depth: 0
- name: Setup pnpm - name: Setup pnpm
@@ -42,12 +48,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Validate
run: |
pnpm check:ci
pnpm typecheck
pnpm test
- name: Release - name: Release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}