Skip to content

Unpublish some versions #15

Unpublish some versions

Unpublish some versions #15

name: release-next-package
on:
push:
branches: [main]
jobs:
release-next-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Test
run: npm test
- name: Publish to npm
run: |
full_sha="${{ github.sha }}"
short_sha="${full_sha::7}"
version="0.0.0-main-${short_sha}"
npm version "$version" --no-git-tag-version
npm publish --access=public --tag=next
npm unpublish "@redhat-developer/[email protected]" --force
npm unpublish "@redhat-developer/[email protected]" --force
npm unpublish "@redhat-developer/[email protected]" --force
npm unpublish "@redhat-developer/[email protected]" --force
npm unpublish "@redhat-developer/[email protected]" --force
npm unpublish "@redhat-developer/[email protected]" --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}