Skip to content

CD-teardown

CD-teardown #846

Workflow file for this run

name: CD-teardown
on: delete
env:
CI: true
jobs:
unpublish-npm:
runs-on: ubuntu-22.04
if: ${{github.event.ref_type == 'branch' && github.actor != 'dependabot[bot]'}}
steps:
- name: Prepare for unpublication from npm
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Determine npm tag
# Remove non-alphanumeric characters
# See https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: echo "TAG_SLUG=$(echo "${{ github.event.ref }}" | tr -cd '[:alnum:]-')" >> $GITHUB_ENV
- name: Remove npm tag for the deleted branch
run: npm dist-tag rm @inrupt/solid-common-vocab $TAG_SLUG
env:
NODE_AUTH_TOKEN: ${{ secrets.INRUPT_NPM_TOKEN }}
- run: echo "Package tag \`$TAG_SLUG\` unpublished."