Skip to content

Commit

Permalink
ci: update reusable workflows (#9)
Browse files Browse the repository at this point in the history
* ci: update reusable workflows

* chore: update several dev tools

* fix

* fix
  • Loading branch information
MaikoTan authored Feb 17, 2024
1 parent b993c22 commit 3bdff2e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 27 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build

on:
push:
pull_request:

jobs:
build:
uses: AwesomeHamster/workflows/.github/workflows/build.yml@master
permissions:
pull-requests: write
issues: write
with:
lint: true
test: true
yarn-no-immutable: true
approve: true
secrets: inherit
18 changes: 11 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ on:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: AwesomeHamster/actions-publish@master
with:
token: ${{ secrets.NPM_TOKEN }}
test: yarn test
uses: AwesomeHamster/workflows/.github/workflows/publish.yml@master
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
with:
yarn-no-immutable: true
test-before-publish: true
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 0 additions & 13 deletions .github/workflows/test.yml

This file was deleted.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
"build": "yarn build:tsup --minify",
"dev": "yarn build:tsup",
"build:tsup": "tsup",
"clean": "rm -rf ./dist",
"test": "mocha -r ts-node/register -r yml-register --extension .spec.ts ./__tests__",
"test": "mocha -r tsx -r yml-register --extension .spec.ts ./__tests__",
"lint": "eslint src/**/*.ts && yarn prettier --check",
"format": "yarn prettier --write",
"prettier": "prettier '**/*.{js,ts,json,yml,yaml,md}' '!lib/**/*'"
Expand Down Expand Up @@ -72,18 +71,21 @@
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"chai": "^4.3.4",
"esbuild-plugin-yaml": "^0.0.1",
"eslint": "^8.19.0",
"eslint-import-resolver-typescript": "^3.4.1",
"koishi": "^4.7.0",
"koishi-plugin-puppeteer": "^3.3.1",
"mocha": "^9.1.3",
"prettier": "^2.7.1",
"ts-node": "^10.8.1",
"tsup": "^8.0.1",
"tsx": "^4.7.1",
"typescript": "^4.7.3",
"yml-register": "^1.1.0"
},
"peerDependencies": {
"@koishijs/plugin-puppeteer": "^3.1.1",
"koishi": "^4.7.0"
"koishi": "^4.7.0",
"koishi-plugin-puppeteer": "^3.3.1"
},
"dependencies": {
"lodestone-news": "^0.1.2"
Expand Down
3 changes: 1 addition & 2 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ export default defineConfig({
clean: true,
outDir: 'lib',
esbuildPlugins: [yaml.yamlPlugin()],
esbuildOptions(options, context) {
},
esbuildOptions(options, context) {},
})

0 comments on commit 3bdff2e

Please sign in to comment.