Skip to content

Commit 2c2fd99

Browse files
committed
chore: Only run release action on test workflow completion
1 parent 8c083a7 commit 2c2fd99

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
name: Release
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["Run tests"]
6+
branches: [main]
7+
types:
8+
- completed
79

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

1012
permissions:
1113
pages: write # to deploy to Pages
1214
id-token: write
1315

14-
# env:
15-
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
16-
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
17-
1816
jobs:
1917
release:
2018
name: Release
2119
runs-on: ubuntu-latest
22-
outputs:
23-
published: ${{ steps.changesets.outputs.published }}
20+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2421
steps:
2522
- uses: actions/checkout@v4
2623
with:
@@ -61,7 +58,6 @@ jobs:
6158

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

.github/workflows/test.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1313
cancel-in-progress: true
1414

15-
env:
16-
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
17-
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
18-
1915
jobs:
2016
test:
2117
name: Run tests
@@ -37,8 +33,5 @@ jobs:
3733
- name: Lint
3834
run: pnpm run lint
3935

40-
# - name: Check types
41-
# run: pnpm run tsc
42-
4336
- name: Run unit tests
4437
run: pnpm run test

0 commit comments

Comments
 (0)