Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisjiang committed May 13, 2024
1 parent 9bd9dde commit d055d89
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 9 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/jsr-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,30 @@ on:
- main

jobs:
install:
runs-on: ubuntu-latest

steps:
- uses: pnpm/action-setup@v4
with:
version: 8

test:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: pnpm install
- run: npm test

publish-jsr:
needs: test
runs-on: ubuntu-latest

permissions:
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ on:
types: [created]

jobs:
build:
install:
runs-on: ubuntu-latest

steps:
- uses: pnpm/action-setup@v4
with:
version: 8

test:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,11 +27,11 @@ jobs:
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: npm ci
- run: pnpm install
- run: npm test

publish-gpr:
needs: build
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -33,7 +42,6 @@ jobs:
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
16 changes: 12 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ on:
types: [created]

jobs:
build:
install:
runs-on: ubuntu-latest

steps:
- uses: pnpm/action-setup@v4
with:
version: 8

test:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,19 +27,18 @@ jobs:
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: npm ci
- run: pnpm install
- run: npm test

publish-npm:
needs: build
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ on:
- main

jobs:
install:
runs-on: ubuntu-latest

steps:
- uses: pnpm/action-setup@v4
with:
version: 8

test:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,7 +27,7 @@ jobs:
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: npm ci
- run: pnpm install
- run: npm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand Down

0 comments on commit d055d89

Please sign in to comment.