Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sepbot committed Oct 8, 2024
1 parent 156a058 commit a0fe65d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 36 deletions.
35 changes: 16 additions & 19 deletions .github/actions/publish/action.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
name: run publish

on: [workflow_call]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
registry-url: https://registry.npmjs.org
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- run: pnpm run generate
- run: pnpm run build
- run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: pnpm publish --tag latest --access=public
runs:
using: composite
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
registry-url: https://registry.npmjs.org
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- run: pnpm run generate
- run: pnpm run build
- run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: pnpm publish --tag latest --access=public
25 changes: 11 additions & 14 deletions .github/actions/test/action.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: run tests

on: [workflow_call]

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- run: pnpm run generate
- run: pnpm run test
runs:
using: composite
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- run: pnpm run generate
- run: pnpm run test
2 changes: 1 addition & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test
- uses: .github/actions/test
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test
- uses: .github/actions/test

release:
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/publish
- uses: .github/actions/publish

0 comments on commit a0fe65d

Please sign in to comment.