-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: switch to pnpm and add release workflow
- Loading branch information
Alan Shaw
committed
Jan 10, 2024
1 parent
b275890
commit 460846d
Showing
8 changed files
with
2,597 additions
and
4,313 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/**' | ||
- 'test/**' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/**' | ||
- 'test/**' | ||
- '.github/workflows/ci.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
node-version: | ||
- 18 | ||
- 20 | ||
os: | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 'latest' | ||
- name: Setup node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- name: Test | ||
run: pnpm run test |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
release-type: node | ||
bump-minor-pre-major: true | ||
- uses: actions/checkout@v2 | ||
if: ${{ steps.release.outputs.release_created }} | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 'latest' | ||
if: ${{ steps.release.outputs.release_created }} | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
cache: 'pnpm' | ||
if: ${{ steps.release.outputs.release_created }} | ||
- name: Install dependencies | ||
run: pnpm install | ||
if: ${{ steps.release.outputs.release_created }} | ||
- name: Publish | ||
run: pnpm publish --access=public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
if: ${{ steps.release.outputs.release_created }} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.