Skip to content

Commit 3e347f8

Browse files
authored
ci: add pre-release (#39)
* chore: upgrade packages * ci: add pre-release * chore: add coverage and fix prettierignore
1 parent 9f43ae8 commit 3e347f8

File tree

18 files changed

+1872
-1459
lines changed

18 files changed

+1872
-1459
lines changed

.github/ISSUE_TEMPLATE/01-command_bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ body:
4141
description: List necessary versions here. This includes your package version, runtime version, operating system etc.
4242
placeholder: |
4343
- @nanoforge-dev/editor 1.0.0 (`npm ls @nanoforge-dev/editor`)
44-
- Node.js 24.11.0 (`node --version`)
44+
- Node.js 25.x.x (`node --version`)
4545
- TypeScript 5.9.3 (`npm ls typescript` if you use it)
4646
- macOS Ventura 13.3.1
4747
validations:

.github/actions/pnpm-install/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
with:
1010
swap-size-gb: 10
1111

12-
- uses: pnpm/action-setup@v4.1.0
12+
- uses: pnpm/action-setup@v4.2.0
1313
name: Install pnpm
1414
with:
1515
run_install: false
@@ -26,7 +26,7 @@ runs:
2626
run: |
2727
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
2828
29-
- uses: actions/cache@v4
29+
- uses: actions/cache@v5
3030
name: Setup pnpm cache
3131
with:
3232
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}

.github/actions/prepare/action.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: prepare
2+
description: Prepare action
3+
inputs:
4+
node-install:
5+
description: Install node
6+
default: 'true'
7+
pnpm-install:
8+
description: Install pnpm depedencies
9+
default: 'true'
10+
build:
11+
description: Build packages
12+
default: 'true'
13+
runs:
14+
using: composite
15+
steps:
16+
- if: inputs.node-install == 'true'
17+
name: Install Node.js
18+
uses: actions/setup-node@v6
19+
with:
20+
node-version: 25
21+
package-manager-cache: false
22+
registry-url: https://registry.npmjs.org
23+
24+
- if: inputs.pnpm-install == 'true'
25+
name: Install dependencies
26+
uses: ./.github/actions/pnpm-install
27+
28+
- if: inputs.build == 'true'
29+
name: Build packages
30+
shell: bash
31+
run: pnpm run build

.github/workflows/pre-release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Pre-Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'New version of the package (leave empty for auto generated version)'
8+
type: string
9+
required: false
10+
dry_run:
11+
description: Perform a dry run?
12+
type: boolean
13+
default: false
14+
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
19+
jobs:
20+
create-release-pr:
21+
name: Create release pr
22+
runs-on: ubuntu-latest
23+
if: github.repository_owner == 'NanoForge-dev'
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v6
27+
with:
28+
fetch-depth: 0
29+
fetch-tags: true
30+
31+
- name: Prepare
32+
uses: ./.github/actions/prepare
33+
34+
- name: Release packages
35+
uses: ./node_modules/@nanoforge-dev/actions/dist/create-release-pr
36+
with:
37+
package: '@nanoforge-dev/editor'
38+
version: ${{ inputs.version }}
39+
dry: ${{ inputs.dry_run }}
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-tag.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release Tag
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
create-release-tag:
15+
name: Create release tag
16+
runs-on: ubuntu-latest
17+
if: github.repository_owner == 'NanoForge-dev' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/')
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v6
21+
22+
- name: Prepare
23+
uses: ./.github/actions/prepare
24+
25+
- name: Create release tag
26+
uses: ./node_modules/@nanoforge-dev/actions/dist/create-release-tag
27+
with:
28+
commit: ${{ github.sha }}
29+
branch: ${{ github.head_ref }}
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,13 @@ jobs:
2020
- name: Checkout repository
2121
uses: actions/checkout@v6
2222

23-
- name: Install Node.js v24
24-
uses: actions/setup-node@v6
25-
with:
26-
node-version: 24
27-
package-manager-cache: false
28-
registry-url: https://registry.npmjs.org/
29-
30-
- name: Install dependencies
31-
uses: ./.github/actions/pnpm-install
32-
33-
- name: Build dependencies
34-
run: pnpm run build
23+
- name: Prepare
24+
uses: ./.github/actions/prepare
3525

3626
- name: Release packages
3727
uses: ./node_modules/@nanoforge-dev/actions/dist/release-packages
3828
with:
3929
package: '@nanoforge-dev/editor'
40-
exclude: ''
4130
dry: ${{ inputs.dry_run }}
4231
env:
4332
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/tests.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
tests:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v6
18+
19+
- name: Prepare
20+
uses: ./.github/actions/prepare
21+
22+
- name: Run linter
23+
run: pnpm lint

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
pnpm --no-install lint-staged
2-
pnpm format

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v23.6.0
1+
v25

.prettierignore

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
# Ignore files for PNPM, NPM and YARN
1+
.idea/
2+
.vscode/
3+
4+
.svelte-kit/
5+
dist/
6+
node_modules/
7+
28
pnpm-lock.yaml
3-
package-lock.json
4-
yarn.lock
5-
bun.lock
9+
pnpm-workspace.yaml
10+
11+
CHANGELOG.md
12+
13+
coverage/
14+
test-results/
15+
16+
project.inlang/cache/
17+
project.inlang/.gitignore
18+
project.inlang/.meta.json
19+
project.inlang/README.md
20+
21+
src/lib/paraglide/

0 commit comments

Comments
 (0)