feat: new interfaces #1
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: Publish CI (pull request) | |
on: | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '22.x' | |
- run: npm ci | |
- run: npm run build --if-present | |
- run: | | |
git config user.name github-actions | |
git config user.email github-actions[bot]@users.noreply.github.com | |
npm version prepatch --preid=${{ env.RELEVANT_SHA }} | |
echo "NEW_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | |
id: github-version | |
env: | |
RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | |
- run: npm publish --access restricted | |
env: | |
# NOTE: using the built-in GITHUB token here because we're publishing to THIS repository's packages. | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create comment | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
I just published a new version of this package :tada: | |
``` | |
${{ env.NEW_VERSION }} | |
``` | |
reactions: '+1' |