-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cleanup github actions workflow
- Loading branch information
Showing
2 changed files
with
50 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ on: | |
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
coverage: | ||
|
@@ -25,7 +24,10 @@ jobs: | |
- name: Check code coverage | ||
run: bun run coverage | ||
|
||
bump-version: | ||
release: | ||
# DO NOT RUN ON PR | ||
if: github.event_name != 'pull_request' | ||
|
||
needs: coverage | ||
|
||
runs-on: ubuntu-latest | ||
|
@@ -54,27 +56,8 @@ jobs: | |
- name: Build library and CLI | ||
run: bun run build | ||
|
||
- name: Update CHANGELOG | ||
id: changelog | ||
uses: requarks/changelog-action@v1 | ||
with: | ||
token: ${{ github.token }} | ||
tag: ${{ github.ref_name }} | ||
writeToFile: false | ||
|
||
- name: Bump package version | ||
run: npx standard-version --prerelease nightly | ||
|
||
- name: Push changes | ||
run: git push --follow-tags origin main | ||
|
||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
prerelease: true | ||
allowUpdates: true | ||
draft: false | ||
makeLatest: true | ||
name: ${{ github.ref_name }} | ||
body: ${{ steps.changelog.outputs.changes }} | ||
token: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,37 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Install packages | ||
run: bun i | ||
|
||
- name: Check code coverage | ||
run: bun run coverage | ||
|
||
release: | ||
needs: coverage | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
@@ -28,7 +52,26 @@ jobs: | |
- name: Build library and CLI | ||
run: bun run build | ||
|
||
- name: Release package | ||
- name: Generate CHANGELOG for Github release | ||
id: changelog | ||
uses: requarks/changelog-action@v1 | ||
with: | ||
token: ${{ github.token }} | ||
tag: ${{ github.ref_name }} | ||
writeToFile: false | ||
|
||
- name: Create Github release | ||
uses: ncipollo/[email protected] | ||
with: | ||
prerelease: true | ||
allowUpdates: true | ||
draft: false | ||
makeLatest: true | ||
name: ${{ github.ref_name }} | ||
body: ${{ steps.changelog.outputs.changes }} | ||
token: ${{ github.token }} | ||
|
||
- name: Publish to NPM | ||
run: npm run publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |