Skip to content

Commit

Permalink
feat: allows for deprecation of an npm version from a github action
Browse files Browse the repository at this point in the history
  • Loading branch information
tibuurcio committed Jun 3, 2024
1 parent fa88242 commit b1df156
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deprecate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Aquarium

on:
workflow_dispatch:
inputs:
version:
description: 'Version to deprecate'
required: true

jobs:
release:
name: Deprecate Version
runs-on: ubuntu-latest

env:
GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
GIT_AUTHOR_NAME: mparticle-automation
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: mparticle-automation
GIT_COMMITTER_EMAIL: [email protected]
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

steps:
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'

- name: Release
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
npm deprecate "${{ github.repository}@${{ github.event.inputs.version }}" "This version has been deprecated."

0 comments on commit b1df156

Please sign in to comment.