diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 399db8e..cc727ae 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,6 @@ on: release: - types: [created] + types: [released] jobs: publish: diff --git a/.github/workflows/publishprerelease.yml b/.github/workflows/publishprerelease.yml new file mode 100644 index 0000000..182d085 --- /dev/null +++ b/.github/workflows/publishprerelease.yml @@ -0,0 +1,20 @@ +on: + release: + types: [prereleased] + +jobs: + publish: + if: github.event_name == 'release' && github.event.action == 'published' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18.x + - run: npm ci + - run: npm test + - run: npm run build + - uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 + with: + tag: prerelease + token: ${{ secrets.NPM_TOKEN }}