Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:
name: release-please
inputs:
tag:
description: 'Tag to release (e.g. v0.0.0-test)'
required: true

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release-please:
test:
uses: ./.github/workflows/tests.yml
secrets: inherit

publish:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: mysql2
changelog-path: 'Changelog.md'
needs: test

steps:
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}

- name: Ensure tag exists (manual run)
if: github.event_name == 'workflow_dispatch'
run: |
git tag ${{ inputs.tag }}
git push origin ${{ inputs.tag }}

- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.release_created }}
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-linux-${{ hashFiles('package-lock.json') }}
restore-keys: npm-linux-

- run: npm ci
if: ${{ steps.release.outputs.release_created }}

- run: npm publish --provenance
if: ${{ steps.release.outputs.release_created }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tag || github.ref_name }}
generate_release_notes: true

- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "singlestore-nodejs",
"version": "1.0.0",
"version": "1.0.1",
"description": "Fast SingleStore driver for Node.js. Implements core protocol, prepared statements, SSL and compression in native JS",
"main": "index.js",
"typings": "typings/mysql/index",
Expand Down
Loading