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
24 changes: 24 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Setup
description: Setup Node.js and install dependencies
inputs:
node-version:
description: Node version
required: false
default: '24'

runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/[email protected]

- name: Setup Node.js ${{ inputs.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ inputs.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: pnpm

- name: Install dependencies
run: pnpm install
shell: bash
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release & Publish to NPM & GitHub
on:
workflow_dispatch:
inputs:
increment:
description: 'Increment type: major, minor, patch, pre...'
required: true
type: choice
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
default: patch

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Setup
uses: ./.github/actions/setup

- name: Import GPG key
id: import-gpg
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- run: pnpm run release --increment ${{github.event.inputs.increment}} --ci
env:
# For release-it
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
# For lerna-changelog
IGNORE_PEER_DEPENDENCIES: release-it
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: write
id-token: write
28 changes: 9 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [20, 22]
node: [22, 24]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup[email protected]
- name: Setup
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node }}
- uses: pnpm/[email protected]
with:
run_install: true

- name: Test
run: pnpm test:coverage
Expand All @@ -40,11 +37,8 @@ jobs:
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
run_install: true
- name: Setup
uses: ./.github/actions/setup

- name: Lint
run: pnpm lint
Expand All @@ -55,11 +49,8 @@ jobs:
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
run_install: true
- name: Setup
uses: ./.github/actions/setup

- name: Build
run: pnpm build
Expand All @@ -77,9 +68,8 @@ jobs:
with:
repository: fluent-vue/examples
path: examples
- name: Setup Node.js
uses: actions/[email protected]
- uses: pnpm/[email protected]
- name: Setup
uses: ./.github/actions/setup

- name: Test
run: node scripts/build-examples.js
3 changes: 2 additions & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"plugins": {
"@release-it-plugins/lerna-changelog": {
"infile": "CHANGELOG.md"
"infile": "CHANGELOG.md",
"launchEditor": false
}
}
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"typecheck": "tsc --noEmit",
"lint": "eslint .",
"prepare": "husky",
"release": "dotenv -- release-it"
"release": "release-it"
},
"peerDependencies": {
"@fluent/bundle": "*",
Expand Down Expand Up @@ -120,7 +120,6 @@
"@vitejs/plugin-vue": "5.2.4",
"@vitest/coverage-istanbul": "^3.1.4",
"@vue/compiler-sfc": "3.5.16",
"dotenv-cli": "8.0.0",
"eslint": "9.28.0",
"execa": "9.6.0",
"husky": "9.1.7",
Expand All @@ -137,7 +136,9 @@
},
"lint-staged": {
"*.js": "eslint --fix",
"*.ts?(x)": "eslint --fix"
"*.ts?(x)": "eslint --fix",
"*.json": "eslint --fix",
"*.md": "eslint --fix"
},
"changelog": {
"labels": {
Expand Down
Loading
Loading