Skip to content

chore: bump version to 2.2.12 in package.json (#83) #55

chore: bump version to 2.2.12 in package.json (#83)

chore: bump version to 2.2.12 in package.json (#83) #55

Workflow file for this run

name: Build and Publish
on:
push:
tags:
- "v*"
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
environment: prod
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1
- run: corepack enable
- name: Set up Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: "20"
- name: Install dependencies
run: pnpm install
- name: Run linter
run: pnpm lint
- name: Build the package
run: pnpm build
- name: Dry-run publishing
run: pnpm publish --dry-run
- name: Get version
id: get_version
run: |
VERSION=$(jq -r .version package.json)
echo "Version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.VERSION }}
name: Release v${{ env.VERSION }}
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
- name: Authenticate npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Check token and Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ -z "$NODE_AUTH_TOKEN" ]; then
echo "NPM_TOKEN is not set."
exit 1
else
echo "NPM_TOKEN is set."
pnpm publish --access public
fi
- name: Notify Slack on Success
if: success()
uses: slackapi/slack-github-action@v2.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "✅ *n8n-nodes-vlmrun v${{ env.VERSION }} Published to npm*\n\n*Version:* `v${{ env.VERSION }}`\n*Commit:* <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
}
}
]
}
- name: Notify Slack on Failure
if: failure()
uses: slackapi/slack-github-action@v2.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "❌ *n8n-nodes-vlmrun Publish Failed*\n\n*Tag:* `${{ github.ref_name }}`\n*Workflow:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>"
}
}
]
}