Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/deprecate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: npm deprecate

on:
pull_request:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a non-PR trigger for the registry mutation

When this workflow is present on the base branch, GitHub's pull_request event runs by default on opened/synchronize/reopened PR activity, and for same-repository PRs NPM_TOKEN is available; that means merely opening or pushing to a PR will run npm deprecate @stellar/stellar-base before anything is merged. npm's deprecation docs describe this no-version command form as deprecating the entire package, so this can mark the public package deprecated from review traffic rather than from an intentional release/manual job; use a release, protected-branch push, or workflow_dispatch trigger instead.

Useful? React with 👍 / 👎.


Comment on lines +3 to +5
jobs:
deprecate:
runs-on: ubuntu-latest
steps:
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Deprecate package on npm
run: npm deprecate "@stellar/stellar-base" "This package is now rolled into @stellar/stellar-sdk. Please use @stellar/stellar-sdk to continue receiving updates and support."
Comment on lines +16 to +17
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading