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
47 changes: 9 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,12 @@ permissions:
contents: read

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Check Prettier
run: npx prettier --check .

- name: Check Commitlint (pull request)
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

- name: Check Commitlint (push)
if: github.event_name == 'push'
run: npx commitlint --last --verbose

- name: Check licenses
run: npm run check:licenses

- name: Check types
run: npm run build

- name: Lint
run: npm run lint
commits:
name: Commits
uses: NixySoftware/.github/.github/workflows/commits.yml@9704b92a2cefe90342562266d127a0c9dd132640 # v0.2.0

typescript:
name: TypeScript
uses: NixySoftware/.github/.github/workflows/typescript.yml@9704b92a2cefe90342562266d127a0c9dd132640 # v0.2.0
with:
enable-test: false
49 changes: 11 additions & 38 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,17 @@ on:
release:
types: [published]

permissions:
contents: read
id-token: write
packages: write

jobs:
publish:
name: Publish
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write
packages: write

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Publish to npm
run: npm publish --access public --registry https://registry.npmjs.org --workspaces

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'
registry-url: 'https://npm.pkg.github.com'

- name: Publish to GitHub Packages
run: npm publish --access public --registry https://npm.pkg.github.com --workspaces
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: NixySoftware/.github/.github/workflows/publish.yml@9704b92a2cefe90342562266d127a0c9dd132640 # v0.2.0
with:
enable-rust: false
enable-typescript: true
typescript-registry-github: true
typescript-registry-npm: true
13 changes: 3 additions & 10 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ permissions:
contents: read

jobs:
lint-title:
runs-on: ubuntu-latest
name: Lint title

steps:
- name: Conventional Commits
uses: ytanikin/pr-conventional-commits@1.5.2
with:
task_types: '["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]'
add_label: 'false'
pull-request:
name: Pull Request
uses: NixySoftware/.github/.github/workflows/commits.yml@9704b92a2cefe90342562266d127a0c9dd132640 # v0.2.0
76 changes: 9 additions & 67 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,74 +14,16 @@ on:

permissions:
contents: write
packages: write

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Generate GitHub App token
id: app-token
uses: getsentry/action-github-app-token@v3
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Bump version
run: npx lerna version --no-git-tag-version --yes ${{ inputs.bump }}

- name: Extract version
id: extract-version
run: echo "VERSION=v$(jq -r .version ./lerna.json)" >> "$GITHUB_OUTPUT"

- name: Format with Prettier
run: npx prettier --write .

- name: Add changes
run: git add .

- name: Commit
id: commit
uses: dsanders11/github-app-commit-action@v2
with:
message: ${{ steps.extract-version.outputs.VERSION }}
token: ${{ steps.app-token.outputs.token }}

- name: Reset and pull
run: git reset --hard && git pull

- name: Tag
uses: actions/github-script@v9
env:
GIT_TAG: ${{ steps.extract-version.outputs.VERSION }}
GIT_SHA: ${{ steps.commit.outputs.sha }}
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${process.env.GIT_TAG}`,
sha: process.env.GIT_SHA
})

- name: Release
uses: softprops/action-gh-release@v3
with:
generate_release_notes: true
make_latest: true
tag_name: ${{ steps.extract-version.outputs.VERSION }}
token: ${{ steps.app-token.outputs.token }}
uses: NixySoftware/.github/.github/workflows/release.yml@9704b92a2cefe90342562266d127a0c9dd132640 # v0.2.0
with:
bump: ${{ inputs.bump }}
bump-rust: false
bump-typescript: true
extract-version: 'typescript'
secrets:
app-client-id: ${{ secrets.APP_ID }}
app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"build": "turbo build",
"check:licenses": "license-checker-rseidelsohn --summary --excludePackagesStartingWith '@nixysoftware/' --onlyAllow '0BSD;Apache-2.0;BSD-2-Clause;BSD-3-Clause;BSD*;BlueOak-1.0.0;CC0-1.0;CC-BY-3.0;CC-BY-4.0;ISC;MIT;MPL-2.0;Python-2.0;Unlicense'",
"check:types": "npm run build",
"dev": "turbo dev",
"lint": "turbo lint",
"prepare": "npm run build"
Expand Down
Loading