Skip to content

Unpublish release (feature branch) #228

Unpublish release (feature branch)

Unpublish release (feature branch) #228

name: Unpublish release (feature branch)
on: delete
jobs:
unpublish-release:
if: github.event.ref_type == 'branch' && github.event.ref != 'refs/heads/main' && github.event.ref != 'refs/heads/beta'
strategy:
matrix:
package:
- drizzle-orm
- drizzle-zod
- drizzle-typebox
- drizzle-valibot
- eslint-plugin-drizzle
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Unpublish
run: |
tag="${{ github.event.ref }}"
tag="${tag#refs/heads/}"
echo "Unpublishing ${{ matrix.package }}@$tag"
npm dist-tag rm ${{ matrix.package }} $tag
echo "npm: \`- ${{ matrix.package }}@$tag\`" >> $GITHUB_STEP_SUMMARY
working-directory: ${{ matrix.package }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}