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
37 changes: 37 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Publish to NPM and JSR registries whenever a tag is pushed
name: Release package

on:
push:
tags: v*
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # The OIDC ID token is used for authentication with NPM and JSR
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version-file: ".node-version"

- name: Install dependencies
run: npm clean-install

- name: Test
run: node --run ci

- name: Build
run: node --run build

# Using "NPM trusted publishing" to authenticate
- name: Publish package to NPM
run: npm publish

# Using "JSR publshing from Github Actions" to authenticate
- name: Publish package to JSR
run: npx jsr publish
10 changes: 5 additions & 5 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Run tests and build

on:
pull_request:
types: [opened, synchronize]
Expand All @@ -7,13 +9,11 @@ jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.node-version'
cache: npm
cache-dependency-path: package-lock.json
node-version-file: ".node-version"

- name: Install dependencies
run: npm clean-install
Expand Down
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
"type": "git",
"url": "git+https://github.com/mdrobny/configate.git"
},
"publishConfig": {
"registry": "https://registry.npmjs.org",
"provenance": true
},
"keywords": [
"config"
],
Expand All @@ -43,5 +47,15 @@
"@biomejs/biome": "2.3.8",
"@types/node": "^22.10.6",
"typescript": "^5.7.3"
},
"devEngines": {
"runtime": {
"name": "node",
"onFail": "error"
},
"packageManager": {
"name": "npm",
"onFail": "error"
}
}
}