forked from inonjs/keywind
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
273 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: ⚙️ Monorepo install (pnpm) | ||
description: 'Run pnpm install' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: ⚙️ Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
id: pnpm-install | ||
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_WEEK=$(/bin/date -u "+%Y%W")" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v4 | ||
name: 🗄️ Setup pnpm cache | ||
id: pnpm-store-cache | ||
with: | ||
path: ${{ steps.pnpm-config.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_WEEK }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_WEEK }}- | ||
- name: 📦 Install dependencies | ||
shell: bash | ||
run: pnpm install --frozen-lockfile --strict-peer-dependencies --prefer-offline | ||
env: | ||
HUSKY: '0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
# https://github.com/peter-evans/enable-pull-request-automerge | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
name: 🤞 Auto merge release | ||
|
||
jobs: | ||
auto-merge: | ||
if: github.actor == 'lotyp' && startsWith(github.head_ref, 'release-please--') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🤞 Auto-merge pull request | ||
uses: peter-evans/enable-pull-request-automerge@v3 | ||
with: | ||
pull-request-number: ${{ github.event.pull_request.number }} | ||
merge-method: merge | ||
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN | ||
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
on: # yamllint disable-line rule:truthy | ||
merge_group: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
# Only consider those paths to trigger the action | ||
paths: | ||
- 'packages/**' | ||
- 'package.json' | ||
- 'pnpm*' | ||
- '.github/**' | ||
- 'tsconfig.json' | ||
- 'tsconfig.node.json' | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
# Only consider those paths to trigger the action | ||
paths: | ||
- 'packages/**' | ||
- 'package.json' | ||
- 'pnpm*' | ||
- '.github/**' | ||
- 'tsconfig.json' | ||
- 'tsconfig.node.json' | ||
|
||
name: 🔍 Continuous integration | ||
|
||
jobs: | ||
integration: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ['ubuntu-22.04'] | ||
node: ['18'] | ||
|
||
steps: | ||
- name: 📦 Check out the codebase | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: ⚙️ Setup node ${{ matrix.node }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: 📥 Monorepo install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: ♻️ Restore packages cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.cache | ||
${{ github.workspace }}/**/tsconfig.tsbuildinfo | ||
key: ${{ runner.os }}-packages-cache-${{ hashFiles('**/pnpm*.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-packages-cache-${{ hashFiles('**/pnpm*.yaml') }} | ||
# Lint packages that have changed (--include & --since) | ||
- name: 🚨 Linter | ||
run: | | ||
pnpm --filter "...[origin/master]" run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# This workflow was added by CodeSee. Learn more at https://codesee.io/ | ||
# This is v2.0 of this workflow file | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request_target: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
|
||
name: 🤖 CodeSee | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
codesee: | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- name: 💻 Analyze the repo with CodeSee | ||
uses: Codesee-io/codesee-action@v2 | ||
with: | ||
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
# https://github.com/google-github-actions/release-please-action#release-types-supported | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
|
||
name: 📦 Create release | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🎉 Create release | ||
uses: google-github-actions/release-please-action@v4 | ||
id: release | ||
with: | ||
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN | ||
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | ||
release-type: node | ||
package-name: docker-node | ||
default-branch: master | ||
changelog-types: | | ||
[ | ||
{ "type": "feat", "section": "Features", "hidden": false }, | ||
{ "type": "fix", "section": "Bug Fixes", "hidden": false }, | ||
{ "type": "perf", "section": "Performance Improvements", "hidden": false }, | ||
{ "type": "docs", "section": "Documentation", "hidden": false }, | ||
{ "type": "chore", "section": "Miscellaneous", "hidden": false }, | ||
{ "type": "style", "section": "Styles", "hidden": true }, | ||
{ "type": "revert", "section": "Reverts", "hidden": true }, | ||
{ "type": "deps", "section": "Dependencies", "hidden": true }, | ||
{ "type": "refactor", "section": "Code Refactoring", "hidden": true }, | ||
{ "type": "test", "section": "Tests", "hidden": true }, | ||
{ "type": "build", "section": "Build System", "hidden": true }, | ||
{ "type": "ci", "section": "Continuous Integration", "hidden": true } | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
# This workflow will triage pull requests and apply a label based on the | ||
# paths that are modified in the pull request. | ||
# | ||
# To use this workflow, you will need to set up a .github/labeler.yml | ||
# file with configuration. For more information, see: | ||
# https://github.com/actions/labeler/blob/master/README.md | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
merge_group: | ||
|
||
name: 🏷️ Add labels | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🏷️ Apply labels | ||
uses: actions/labeler@v5 | ||
with: | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
# https://github.com/google-github-actions/release-please-action#release-types-supported | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
name: 📤 Upload artifacts | ||
|
||
jobs: | ||
upload-artifacts: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ['ubuntu-22.04'] | ||
node: ['18'] | ||
|
||
steps: | ||
- name: 📦 Check out the codebase | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
||
- name: ⚙️ Setup node ${{ matrix.node }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: 📥 Monorepo install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: ♻️ Restore packages cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.cache | ||
${{ github.workspace }}/**/tsconfig.tsbuildinfo | ||
key: ${{ runner.os }}-packages-cache-${{ hashFiles('**/pnpm*.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-packages-cache-${{ hashFiles('**/pnpm*.yaml') }} | ||
- name: 🚀 Generate dist files | ||
run: pnpm build:jar | ||
|
||
- name: 📤 Upload release assets | ||
uses: alexellis/upload-assets@0.4.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
asset_paths: '["./out/keywind.jar"]' |