mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 04:28:28 +02:00
ci: build and format code only before release
This commit is contained in:
parent
f75205b850
commit
a00108bc0a
2 changed files with 5 additions and 42 deletions
42
.github/workflows/format-and-build.yml
vendored
42
.github/workflows/format-and-build.yml
vendored
|
@ -1,42 +0,0 @@
|
||||||
name: 🔄 Format & Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
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
|
|
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
@ -29,6 +29,11 @@ jobs:
|
||||||
- name: 📦 Install Dependencies
|
- name: 📦 Install Dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
|
- name: 🔄 Format and build
|
||||||
|
run: |
|
||||||
|
npm run format
|
||||||
|
npm run build
|
||||||
|
|
||||||
- name: 📜 Generate changelog and release new version
|
- name: 📜 Generate changelog and release new version
|
||||||
run: |
|
run: |
|
||||||
npx changelogen --release --push
|
npx changelogen --release --push
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue