Skip to content

v6.3.0

v6.3.0 #26

Workflow file for this run

name: Publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: pnpm 🧰
uses: pnpm/action-setup@v3
with:
version: 9.x
- name: Node 🧰
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
- name: Install 📦
run: pnpm install --frozen-lockfile
- name: Build 🛠
run: pnpm build
- name: Uncommitted changes 🔎
run: git status
- name: Publish 🚀 PRODUCTION on JSR.io
if: '!github.event.release.prerelease'
run: |
pnpm --filter '*' jsr:publish
- name: Publish 🚀 PRERELEASE
if: 'github.event.release.prerelease'
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
pnpm -r publish --tag next --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish 🚀 PRODUCTION
if: '!github.event.release.prerelease'
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
pnpm -r publish --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.25.0
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
# channel-id: 'pipeline'
# For posting a rich message using Block Kit
payload: |
{
"text": "New release ${{github.ref_name}} for ${{github.event.repository.name}}.",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "New release for <${{github.event.repository.html_url}}|`${{github.event.repository.name}}`>\n*<${{github.event.release.html_url}}|release notes>*"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Project:*\n${{github.event.repository.name}}"
},
{
"type": "mrkdwn",
"text": "*Version:*\n${{github.ref_name}}"
}
]
},
{
"type": "context",
"elements": [
{
"type": "image",
"image_url": "${{github.event.sender.avatar_url}}",
"alt_text": "${{github.event.sender.login}}"
},
{
"type": "mrkdwn",
"text": "*${{github.event.sender.login}}* has triggered this release."
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.PIPELINE_SLACK_CHANNEL_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK