diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 38b5663..d6d23c0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,12 @@ on: release: types: [published] workflow_dispatch: + inputs: + publish: + description: Publish to npm after validation + required: true + type: boolean + default: false permissions: contents: read @@ -12,7 +18,7 @@ permissions: jobs: npm: name: Publish to npm - runs-on: ubuntu-latest + runs-on: [self-hosted, Linux, X64, nvoip-ci-public-release] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -20,6 +26,7 @@ jobs: node-version: "20" registry-url: "https://registry.npmjs.org" - run: npm pack --dry-run - - run: npm publish --access public --provenance + - if: github.event_name == 'release' || inputs.publish + run: npm publish --access public --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}