Skip to content

Commit

Permalink
ci: fix release.yml to only execute on release
Browse files Browse the repository at this point in the history
  • Loading branch information
veloii committed May 28, 2024
1 parent 1c02566 commit 9fd1db9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Release
on:
push:
branches:
- main
release:
types: [published]

jobs:
release:
Expand Down Expand Up @@ -43,15 +42,15 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Test
run: pnpm test
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish

- name: Upload coverage reports to Codecov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- run: pnpm build
- run: pnpm test
Expand Down

0 comments on commit 9fd1db9

Please sign in to comment.