diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ae7df56..90e399f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,6 +3,19 @@ on: release: types: [published] workflow_dispatch: + inputs: + version: + description: "The version to publish" + required: true + tag: + description: "Tag" + required: true + default: "latest" + type: choice + options: + - latest + - snapshot + - next jobs: publish: runs-on: ubuntu-latest @@ -15,6 +28,7 @@ jobs: with: node-version: "18.x" registry-url: "https://registry.npmjs.org" - - run: npm publish --provenance --access public + - run: npm pkg set "version=${{ inputs.version }}" + - run: npm publish --provenance --tag ${{ inputs.tag }} --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}