Skip to content

chore(deps-dev): bump @types/node from 25.0.9 to 25.0.10 #62

chore(deps-dev): bump @types/node from 25.0.9 to 25.0.10

chore(deps-dev): bump @types/node from 25.0.9 to 25.0.10 #62

Workflow file for this run

name: NPM Release on PR Merge
on:
pull_request:
types: [closed]
branches: [main]
jobs:
release:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
runs-on: ubuntu-latest
environment: github action
services:
postgres:
image: kibaes/postgres-logical-replication-dev:17
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgrespw
POSTGRES_DB: playground
ports:
- "5432:5432"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Get package version
id: package_version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Run tests
run: npm test
- name: Build
run: npm run build
- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create tag
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git tag "v${{ steps.package_version.outputs.version }}"
git push origin "v${{ steps.package_version.outputs.version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ steps.package_version.outputs.version }}"
release_name: "v${{ steps.package_version.outputs.version }}"
draft: true
prerelease: false