diff --git a/.github/actions/pnpm-install/action.yml b/.github/actions/pnpm-install/action.yml index 17996f5..cd29afe 100644 --- a/.github/actions/pnpm-install/action.yml +++ b/.github/actions/pnpm-install/action.yml @@ -9,7 +9,7 @@ runs: with: swap-size-gb: 10 - - uses: pnpm/action-setup@v4.1.0 + - uses: pnpm/action-setup@v4.2.0 name: Install pnpm with: run_install: false @@ -26,7 +26,7 @@ runs: run: | echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 + - uses: actions/cache@v5 name: Setup pnpm cache with: path: ${{ steps.pnpm-config.outputs.STORE_PATH }} diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml new file mode 100644 index 0000000..61fe548 --- /dev/null +++ b/.github/actions/prepare/action.yml @@ -0,0 +1,31 @@ +name: prepare +description: Prepare action +inputs: + node-install: + description: Install node + default: "true" + pnpm-install: + description: Install pnpm depedencies + default: "true" + build: + description: Build packages + default: "true" +runs: + using: composite + steps: + - if: inputs.node-install == 'true' + name: Install Node.js + uses: actions/setup-node@v6 + with: + node-version: 25 + package-manager-cache: false + registry-url: https://registry.npmjs.org + + - if: inputs.pnpm-install == 'true' + name: Install dependencies + uses: ./.github/actions/pnpm-install + + - if: inputs.build == 'true' + name: Build packages + shell: bash + run: pnpm run build diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml new file mode 100644 index 0000000..1873ff0 --- /dev/null +++ b/.github/workflows/pre-release.yml @@ -0,0 +1,41 @@ +name: Pre-Release + +on: + workflow_dispatch: + inputs: + version: + description: "New version of the package (leave empty for auto generated version)" + type: string + required: false + dry_run: + description: Perform a dry run? + type: boolean + default: false + +permissions: + contents: write + pull-requests: write + +jobs: + create-release-pr: + name: Create release pr + runs-on: ubuntu-latest + if: github.repository_owner == 'NanoForge-dev' + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Prepare + uses: ./.github/actions/prepare + + - name: Release packages + uses: ./node_modules/@nanoforge-dev/actions/dist/create-release-pr + with: + package: "@nanoforge-dev/schematics" + version: ${{ inputs.version }} + dry: ${{ inputs.dry_run }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml new file mode 100644 index 0000000..1e631d1 --- /dev/null +++ b/.github/workflows/release-tag.yml @@ -0,0 +1,31 @@ +name: Release Tag + +on: + pull_request: + types: + - closed + branches: + - main + +permissions: + contents: write + +jobs: + create-release-tag: + name: Create release tag + runs-on: ubuntu-latest + if: github.repository_owner == 'NanoForge-dev' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/') + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Prepare + uses: ./.github/actions/prepare + + - name: Create release tag + uses: ./node_modules/@nanoforge-dev/actions/dist/create-release-tag + with: + commit: ${{ github.sha }} + branch: ${{ github.head_ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6e5a9f..f9fe68e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,18 +33,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 - - name: Install Node.js - uses: actions/setup-node@v6 - with: - node-version: 25 - 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: Prepare + uses: ./.github/actions/prepare - name: Release packages uses: ./node_modules/@nanoforge-dev/actions/dist/release-packages diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 213e0f3..1d4982b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,33 +4,20 @@ on: pull_request: branches: - main - - dev + push: + branches: + - main workflow_dispatch: -env: - EM_CACHE_FOLDER: "emsdk-cache" - jobs: tests: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v5 - - - name: "Setup pnpm" - uses: pnpm/action-setup@v4 - - - name: "Setup node" - uses: actions/setup-node@v4 - with: - node-version: 25 - cache: "pnpm" - - - name: "Install dependencies" - run: pnpm install + - name: Checkout repository + uses: actions/checkout@v6 - - name: "Run build" - run: pnpm build + - name: Prepare + uses: ./.github/actions/prepare - - name: "Run linter" + - name: Run linter run: pnpm lint diff --git a/.prettierignore b/.prettierignore index 3a167a7..cc478d4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,14 +1,15 @@ -# Ignore files for PNPM, NPM and YARN +.idea/ +.vscode/ + +dist/ +node_modules/ + pnpm-lock.yaml -package-lock.json -yarn.lock -bun.lock +pnpm-workspace.yaml -apps/ +CHANGELOG.md -.turbo/ -node_modules/ -dist/ coverage/ -CHANGELOG.md -documentation/ + +.turbo/ +apps/ diff --git a/apps/client/.prettierignore b/apps/client/.prettierignore index 64b127c..e0c5146 100644 --- a/apps/client/.prettierignore +++ b/apps/client/.prettierignore @@ -1,11 +1,14 @@ -# Ignore files for PNPM, NPM and YARN -pnpm-lock.yaml -package-lock.json -yarn.lock -bun.lock +.idea/ +.vscode/ -.turbo/ -node_modules/ dist/ -coverage/ +node_modules/ + +pnpm-lock.yaml +pnpm-workspace.yaml + CHANGELOG.md + +coverage/ + +.turbo/ diff --git a/apps/server/.prettierignore b/apps/server/.prettierignore index 64b127c..e0c5146 100644 --- a/apps/server/.prettierignore +++ b/apps/server/.prettierignore @@ -1,11 +1,14 @@ -# Ignore files for PNPM, NPM and YARN -pnpm-lock.yaml -package-lock.json -yarn.lock -bun.lock +.idea/ +.vscode/ -.turbo/ -node_modules/ dist/ -coverage/ +node_modules/ + +pnpm-lock.yaml +pnpm-workspace.yaml + CHANGELOG.md + +coverage/ + +.turbo/ diff --git a/apps/website/.prettierignore b/apps/website/.prettierignore index 64b127c..e0c5146 100644 --- a/apps/website/.prettierignore +++ b/apps/website/.prettierignore @@ -1,11 +1,14 @@ -# Ignore files for PNPM, NPM and YARN -pnpm-lock.yaml -package-lock.json -yarn.lock -bun.lock +.idea/ +.vscode/ -.turbo/ -node_modules/ dist/ -coverage/ +node_modules/ + +pnpm-lock.yaml +pnpm-workspace.yaml + CHANGELOG.md + +coverage/ + +.turbo/ diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 29298db..54e661f 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,25 +7,25 @@ catalogs: turbo: ^2.7.5 typescript: ^5.9.3 ci: - "@commitlint/cli": ^20.3.1 - "@commitlint/config-conventional": ^20.3.1 - "@favware/cliff-jumper": ^6.0.0 - "@nanoforge-dev/actions": ^1.1.0 + '@commitlint/cli': ^20.3.1 + '@commitlint/config-conventional': ^20.3.1 + '@favware/cliff-jumper': ^6.0.0 + '@nanoforge-dev/actions': ^1.1.0 husky: ^9.1.7 lint-staged: ^16.2.7 core: - "@types/bun": ^1.3.6 - "@types/node": ^25.0.10 + '@types/bun': ^1.3.6 + '@types/node': ^25.0.10 bun: ^1.3.6 lint: - "@nanoforge-dev/utils-eslint-config": ^1.0.1 - "@nanoforge-dev/utils-prettier-config": ^1.0.1 - "@trivago/prettier-plugin-sort-imports": ^6.0.2 + '@nanoforge-dev/utils-eslint-config': ^1.0.1 + '@nanoforge-dev/utils-prettier-config': ^1.0.1 + '@trivago/prettier-plugin-sort-imports': ^6.0.2 eslint: ^9.39.2 prettier: ^3.8.1 schematics: - "@angular-devkit/core": ^21.1.1 - "@angular-devkit/schematics": ^21.1.1 + '@angular-devkit/core': ^21.1.1 + '@angular-devkit/schematics': ^21.1.1 onlyBuiltDependencies: - bun