diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index e8cb804..fbd50e2 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -26,13 +26,17 @@ jobs: - name: covector version or publish (publish when no change files present) uses: jbolda/covector/packages/action@covector-v0 id: covector - env: - NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }} with: token: ${{ secrets.GITHUB_TOKEN }} command: "publish" createRelease: true - - name: Get result - run: >- - "{"releaseId": "${{ steps.covector.outputs['-org-dashed-pkg-releaseId'] }}" }" + - name: Trigger `@org-dashed/pkg` publishing workflow + if: | + steps.covector.outputs.successfulPublish == 'true' && + contains(steps.covector.outputs.packagesPublished, '@org-dashed/pkg') + uses: peter-evans/repository-dispatch@v2 + with: + event-type: publish-pkg + client-payload: >- + "{"releaseId": "${{ steps.covector.outputs['-org-dashed-releaseId'] }}" }" diff --git a/.github/workflows/publish-pkg.yml b/.github/workflows/publish-pkg.yml new file mode 100644 index 0000000..a824e20 --- /dev/null +++ b/.github/workflows/publish-pkg.yml @@ -0,0 +1,16 @@ +name: Publish `@org-dashed/pkg` + +permissions: + contents: write + id-token: write + +on: + repository_dispatch: + types: [publish-pkg] + +jobs: + publish: + runs-on: "ubuntu-latest" + steps: + - name: Publish + run: echo "${{ github.event.client_payload.releaseId }}" diff --git a/package.json b/package.json index 25b3ba9..922c0db 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,4 @@ { "name": "@org-dashed/pkg", - "version": "0.19.0" + "version": "0.20.0" }