diff --git a/.github/workflows/publish-to-npm-on-tag.yml b/.github/workflows/publish-to-npm-on-tag.yml new file mode 100644 index 00000000..069455e2 --- /dev/null +++ b/.github/workflows/publish-to-npm-on-tag.yml @@ -0,0 +1,26 @@ +name: publish-on-tag + +on: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Check out repository + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + fetch-depth: 2 + - name: Publish + env: + NPM_TOKEN: ${{secrets.NPM_TOKEN}} + TAG_NAME: ${{github.ref_name}} + run: | + npm config set registry 'https://wombat-dressing-room.appspot.com/' + npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}' + npm publish --provenance --access public