From a0fe65d11d3f33b3f6031cf9392c5ab86af528a7 Mon Sep 17 00:00:00 2001 From: sepbot Date: Tue, 8 Oct 2024 19:58:51 +1100 Subject: [PATCH] update actions --- .github/actions/publish/action.yaml | 35 +++++++++++++---------------- .github/actions/test/action.yaml | 25 +++++++++------------ .github/workflows/push.yaml | 2 +- .github/workflows/release.yaml | 4 ++-- 4 files changed, 30 insertions(+), 36 deletions(-) diff --git a/.github/actions/publish/action.yaml b/.github/actions/publish/action.yaml index b47bc15..4a037cb 100644 --- a/.github/actions/publish/action.yaml +++ b/.github/actions/publish/action.yaml @@ -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 diff --git a/.github/actions/test/action.yaml b/.github/actions/test/action.yaml index 0e4298b..b2efbc1 100644 --- a/.github/actions/test/action.yaml +++ b/.github/actions/test/action.yaml @@ -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 diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index a94022a..c1152a1 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -6,4 +6,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/test + - uses: .github/actions/test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5af45a1..9a28e09 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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