Skip to content

Commit

Permalink
ci: add ci and releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
nethriis committed May 10, 2024
1 parent 5668c9d commit 0227cb1
Show file tree
Hide file tree
Showing 4 changed files with 317 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: ⚙️ ci

on:
push:
branches:
- main

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- run: corepack enable
- uses: actions/[email protected]
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
cache: pnpm

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Build
run: pnpm build
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 🚀 release

on:
release:
types: [published]

permissions: {}

jobs:
release:
permissions:
id-token: write
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/[email protected]
- run: corepack enable
- uses: actions/[email protected]
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
cache: pnpm

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Build
run: pnpm build

- name: Release
run: pnpm publish --access public --no-git-checks --tag latest
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
"*.d.ts"
],
"scripts": {
"lint": "prettier --write .",
"prepack": "unbuild",
"start": "node ./bin/index.mjs",
"lint": "prettier --write ."
"release": "changelogen --release"
},
"resolutions": {
"@harmonix-js/core": "link:."
Expand All @@ -30,6 +31,7 @@
},
"devDependencies": {
"@types/node": "^20.12.8",
"changelogen": "^0.5.5",
"prettier": "^3.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
Expand Down
Loading

0 comments on commit 0227cb1

Please sign in to comment.