Skip to content

Commit

Permalink
ci: add release and labels workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Oct 10, 2024
1 parent 96df6a6 commit e49bcae
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 35 deletions.
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: test
on:
- push
- pull_request
- workflow_call

jobs:
lint:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Sync labels
on:
workflow_dispatch:
permissions:
issues: write
jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EndBug/label-sync@v2
with:
config-file: 'https://raw.githubusercontent.com/thetutlage/static/main/labels.yml'
delete-other-labels: true
token: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release
on: workflow_dispatch
permissions:
contents: write
id-token: write
jobs:
checks:
uses: ./.github/workflows/checks.yml
release:
needs: checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Init npm config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm install
- run: npm run release -- --ci
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { configPkg } from '@adonisjs/eslint-config'
export default configPkg()
81 changes: 46 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,59 +52,55 @@
"release": "np",
"version": "npm run build",
"typecheck": "tsc --noEmit",
"sync-labels": "github-label-sync --labels ./node_modules/@adonisjs/mrm-preset/gh-labels.json adonisjs/lucid",
"format": "prettier --write .",
"prepublishOnly": "npm run build",
"test": "c8 npm run test:docker",
"index:commands": "adonis-kit index build/commands"
},
"devDependencies": {
"@adonisjs/assembler": "^7.7.0",
"@adonisjs/core": "^6.12.1",
"@adonisjs/eslint-config": "^1.3.0",
"@adonisjs/prettier-config": "^1.3.0",
"@adonisjs/tsconfig": "^1.3.0",
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"@adonisjs/assembler": "^7.8.2",
"@adonisjs/core": "^6.14.1",
"@adonisjs/eslint-config": "^2.0.0-beta.7",
"@adonisjs/prettier-config": "^1.4.0",
"@adonisjs/tsconfig": "^1.4.0",
"@japa/assert": "^3.0.0",
"@japa/file-system": "^2.3.0",
"@japa/runner": "^3.1.4",
"@libsql/sqlite3": "^0.3.1",
"@swc/core": "^1.7.6",
"@release-it/conventional-changelog": "^8.0.2",
"@swc/core": "^1.7.26",
"@types/chance": "^1.1.6",
"@types/luxon": "^3.4.2",
"@types/node": "^22.1.0",
"@types/node": "^22.7.5",
"@types/pretty-hrtime": "^1.0.3",
"@types/qs": "^6.9.15",
"@types/qs": "^6.9.16",
"@vinejs/vine": "^2.1.0",
"better-sqlite3": "^11.1.2",
"better-sqlite3": "^11.3.0",
"c8": "^10.1.2",
"chance": "^1.1.12",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"del-cli": "^5.1.0",
"del-cli": "^6.0.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint": "^9.12.0",
"fs-extra": "^11.2.0",
"github-label-sync": "^2.3.1",
"husky": "^9.1.4",
"luxon": "^3.5.0",
"mysql2": "^3.11.0",
"np": "^10.0.7",
"pg": "^8.12.0",
"mysql2": "^3.11.3",
"pg": "^8.13.0",
"prettier": "^3.3.3",
"reflect-metadata": "^0.2.2",
"release-it": "^17.8.2",
"sqlite3": "^5.1.7",
"tedious": "^18.3.0",
"tedious": "^18.6.1",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
"typescript": "^5.6.3"
},
"dependencies": {
"@adonisjs/presets": "^2.6.1",
"@faker-js/faker": "^8.4.1",
"@poppinss/hooks": "^7.2.3",
"@poppinss/macroable": "^1.0.2",
"@poppinss/utils": "^6.7.3",
"@adonisjs/presets": "^2.6.3",
"@faker-js/faker": "^9.0.3",
"@poppinss/hooks": "^7.2.4",
"@poppinss/macroable": "^1.0.3",
"@poppinss/utils": "^6.8.3",
"fast-deep-equal": "^3.1.3",
"igniculus": "^1.5.0",
"kleur": "^4.1.5",
Expand Down Expand Up @@ -141,9 +137,6 @@
"overrides": {
"strtok3": "8.0.1"
},
"eslintConfig": {
"extends": "@adonisjs/eslint-config/package"
},
"prettier": "@adonisjs/prettier-config",
"commitlint": {
"extends": [
Expand All @@ -152,13 +145,31 @@
},
"publishConfig": {
"access": "public",
"tag": "latest"
"provenance": true
},
"np": {
"message": "chore(release): %s",
"tag": "latest",
"branch": "main",
"anyBranch": false
"release-it": {
"git": {
"requireCleanWorkingDir": true,
"requireUpstream": true,
"commitMessage": "chore(release): ${version}",
"tagAnnotation": "v${version}",
"push": true,
"tagName": "v${version}"
},
"github": {
"release": true
},
"npm": {
"publish": true,
"skipChecks": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name": "angular"
}
}
}
},
"c8": {
"reporter": [
Expand Down

0 comments on commit e49bcae

Please sign in to comment.