Skip to content

Commit

Permalink
chore: Only run release action on test workflow completion
Browse files Browse the repository at this point in the history
  • Loading branch information
WillsonHaw committed Jan 11, 2025
1 parent 8c083a7 commit 2c2fd99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: Release

on:
push:
branches:
- main
workflow_run:
workflows: ["Run tests"]
branches: [main]
types:
- completed

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
pages: write # to deploy to Pages
id-token: write

# env:
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -61,7 +58,6 @@ jobs:

deploy-pages:
needs: release
if: ${{ needs.release.outputs.published == 'true' }}
name: Deploy Docs to GitHub Pages
runs-on: ubuntu-latest

Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

jobs:
test:
name: Run tests
Expand All @@ -37,8 +33,5 @@ jobs:
- name: Lint
run: pnpm run lint

# - name: Check types
# run: pnpm run tsc

- name: Run unit tests
run: pnpm run test

0 comments on commit 2c2fd99

Please sign in to comment.