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
42 changes: 42 additions & 0 deletions .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "pnpm install"
description: "Run pnpm install with cache enabled"
runs:
using: "composite"
steps:
- name: Set up swap space
if: runner.os == 'Linux'
uses: pierotofy/[email protected]
with:
swap-size-gb: 10

- uses: pnpm/[email protected]
name: Install pnpm
with:
run_install: false

- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
id: pnpm-config
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache rotation keys
id: cache-rotation
shell: bash
run: |
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-

- name: Install dependencies
shell: bash
run: |
pnpm install --frozen-lockfile --prefer-offline --loglevel error
env:
HUSKY: "0"
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
workflow_dispatch:
inputs:
dry_run:
description: Perform a dry run?
type: boolean
default: false

permissions:
contents: write

jobs:
npm-publish:
name: npm publish
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev'
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Install Node.js v24
uses: actions/setup-node@v6
with:
node-version: 24
package-manager-cache: false
registry-url: https://registry.npmjs.org/

- name: Install dependencies
uses: ./.github/actions/pnpm-install

- name: Build dependencies
run: pnpm run build

- name: Release packages
uses: ./node_modules/@nanoforge-dev/actions/dist/release-packages
with:
package: "@nanoforge-dev/cli"
exclude: ""
dry: ${{ inputs.dry_run }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .idea/betterCommentsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@commitlint/config-conventional": "^20.0.0",
"@eslint/js": "^9.39.0",
"@favware/cliff-jumper": "^6.0.0",
"@nanoforge-dev/actions": "^1.0.2",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/inquirer": "^9.0.9",
"@types/node": "^24.10.1",
Expand Down
Loading