diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 1f3ef6d..2c90e8f 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,14 +1,30 @@ name: Publish on: - workflow_call: + release: + types: [ published ] permissions: contents: read id-token: write # Required for OIDC jobs: + build: + permissions: + contents: read + actions: write + runs-on: ubuntu-latest + steps: + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + node-version: 24 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - run: npm install + - run: npm test + - run: npm run lint + release: runs-on: ubuntu-latest + needs: build steps: - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: @@ -17,4 +33,4 @@ jobs: - name: npm release run: | npm ci - npm publish --provenance + npm publish --no-git-checks --access public diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c52319c..d1caf41 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -2,8 +2,6 @@ name: CI on: push: branches: [ master ] - release: - types: [ published ] pull_request: workflow_dispatch: schedule: @@ -11,7 +9,6 @@ on: permissions: contents: read - id-token: write jobs: build: @@ -205,8 +202,3 @@ jobs: assignees: CAMOBAP update_existing: true filename: .github/examples-issue-template.md - - release: - if: github.event_name == 'release' - needs: test - uses: ./.github/workflows/publish.yaml