Skip to content

chore(ci): add npm deprecation workflow #1

chore(ci): add npm deprecation workflow

chore(ci): add npm deprecation workflow #1

name: Deprecate npm package versions
on:
push:
branches:
- chore/deprecate-0.9.4-npm
jobs:
deprecate:
name: Deprecate ${{ matrix.package_name }}@0.9.4
runs-on: ubuntu-latest
environment: npm
strategy:
fail-fast: false
matrix:
package_name:
- hunkdiff
- hunkdiff-linux-arm64
- hunkdiff-linux-x64
- hunkdiff-darwin-arm64
- hunkdiff-darwin-x64
steps:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
- name: Verify npm auth
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm whoami
- name: Deprecate package version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
DEPRECATION_MESSAGE: 0.9.4 was published from the wrong branch; please use 0.9.5 or later.
run: npm deprecate "${{ matrix.package_name }}@0.9.4" "$DEPRECATION_MESSAGE"