Skip to content
Open
Show file tree
Hide file tree
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
24 changes: 21 additions & 3 deletions .github/workflows/shipjs-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/v')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
node-version: '16'
node-version: '24'
- name: Pin npm with staged publishing support
run: npm install -g npm@">=11.15.0"
- run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
Expand All @@ -27,3 +29,19 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Read package metadata
id: pkg
run: |
{
echo "name=$(node -p "require('./package.json').name")"
echo "version=$(node -p "require('./package.json').version")"
} >> "$GITHUB_OUTPUT"
- name: Notify Slack about staged release
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: ${{ secrets.SLACK_NPM_RELEASE_CHANNEL }}
slack-message: |
:package: *${{ steps.pkg.outputs.name }}@${{ steps.pkg.outputs.version }}* staged for review
Review & approve (2FA required): https://www.npmjs.com/package/${{ steps.pkg.outputs.name }}?activeTab=staged
2 changes: 1 addition & 1 deletion ship.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
publishCommand: ({ defaultCommand }) => `${defaultCommand} --access public`,
publishCommand: ({ tag }) => `npm stage publish --tag ${tag}`,
mergeStrategy: { toSameBranch: ['master'] },
pullRequestReviewers: ['nd0ut']
}
Loading