Skip to content
Open
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
48 changes: 0 additions & 48 deletions .github/workflows/dev-packages.yaml

This file was deleted.

53 changes: 26 additions & 27 deletions .github/workflows/release-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,58 @@ on:
push:
branches:
- main
workflow_dispatch: # For dev publishing

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
id-token: write # Required for OIDC / trusted publishing
contents: write # Required for changesets pushing commits
pull-requests: write # Required for changesets creating PRs

jobs:
release-packages:
name: Release Packages
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Enable Corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Add NPM auth
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
cache: pnpm

- name: Install dependencies
run: pnpm install
- name: Update npm
run: |
npm install -g npm@latest
npm --version

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
if: ${{ github.event_name == 'push' }}
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
version: pnpm changeset version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Debug Outputs
if: ${{ github.event_name == 'push' }}
run: |
echo "Published Packages: ${{ steps.changesets.outputs.publishedPackages }}"
echo "Published Packages: ${{ steps.changesets.outputs.publishedPackages }}"

- name: Dev publish
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
pnpm changeset version --no-git-tag --snapshot dev
pnpm changeset publish --tag dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 6 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
mysql-version: [ 8.0, 8.4 ]

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/checkout@v5
- name: Enable Corepack
run: corepack enable

- name: Start MySQL
run: |
Expand All @@ -29,31 +29,13 @@ jobs:
--log-bin=/var/lib/mysql/mysql-bin.log

- name: Setup NodeJS
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Test
run: pnpm test
run: pnpm test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.14.0
v22.21.0
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@
"big-integer": "1.6.52",
"iconv-lite": "0.6.3",
"@vlasky/mysql": "^2.18.6"
}
},
"packageManager": "[email protected]+sha512.c9fc7236e92adf5c8af42fd5bf1612df99c2ceb62f27047032f4720b33f8eacdde311865e91c411f2774f618d82f320808ecb51718bfa82c060c4ba7c76a32b8"
}