v0.19.2 #126
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: npmjs | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install pnpm 📦 | |
uses: pnpm/action-setup@v4 | |
# use version from package.json#packageManager field | |
- run: pnpm install | |
- run: cd packages/mantle && pnpm publish --access public --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
- name: Grab the released version and store it in an env variable | |
run: | | |
VERSION=$(jq -r '.version' ./packages/mantle/package.json) | |
echo "MANTLE_VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Post to slack | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PUBLISH_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{"text":"`@ngrok/mantle@${{ env.MANTLE_VERSION }}` published to npm!\nInstall with: `pnpm add -E @ngrok/mantle@${{ env.MANTLE_VERSION }}`\n<https://github.com/ngrok-oss/mantle/releases/tag/v${{ env.MANTLE_VERSION }}|Release Notes>"}' $SLACK_WEBHOOK_URL |