diff --git a/.github/workflows/format-and-build.yml b/.github/workflows/format-and-build.yml new file mode 100644 index 0000000..41c4ffe --- /dev/null +++ b/.github/workflows/format-and-build.yml @@ -0,0 +1,42 @@ +name: 🔄 Format & Build + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +permissions: + contents: read + +jobs: + format: + runs-on: ubuntu-latest + steps: + - name: 📥 Checkout + uses: actions/checkout@v4 + + - name: 🛠️ Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: 🔧 Configure Git + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + + - name: 📦 Install Dependencies + run: npm install + + - name: 🔄 Format and build + run: | + npm run format + npm run build + + - name: 💾 Commit changes + run: | + git add . + git commit -m "chore: format and build" + git push diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d83f9aa..d6647da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,9 +29,6 @@ jobs: - name: 📦 Install Dependencies run: npm install - - name: 🚀 Prepare release - run: bun run preversion - - name: 📜 Generate changelog and release new version run: | npx changelogen --release --push diff --git a/package.json b/package.json index 3c153bb..7e5e298 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "scripts": { "format": "prettier --write src *.yml *.json *.md", "build": "esbuild --target=node20 --outfile=dist/setup/index.js --bundle --minify --platform=node --format=cjs src/index.ts && esbuild --target=node20 --outfile=dist/cache-save/index.js --bundle --minify --platform=node --format=cjs src/cache-save.ts", - "preversion": "npm run format && npm run build && git add .", "start": "npm run build && node dist/setup/index.js" }, "dependencies": {