mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-21 05:58:21 +02:00
feat(ci): automatically generate release notes and build dist only on release
This commit is contained in:
parent
54cb141c5c
commit
642432120d
5 changed files with 975 additions and 51 deletions
34
.github/workflows/format.yml
vendored
34
.github/workflows/format.yml
vendored
|
@ -1,34 +0,0 @@
|
|||
name: autofix.ci # Must be named this for autofix.ci to work
|
||||
|
||||
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: 📦 Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: 🧹 Format
|
||||
run: |
|
||||
npm run format
|
||||
npm run build
|
||||
|
||||
- name: 💾 Commit
|
||||
uses: autofix-ci/action@d3e591514b99d0fca6779455ff8338516663f7cc
|
41
.github/workflows/release.yml
vendored
41
.github/workflows/release.yml
vendored
|
@ -1,14 +1,6 @@
|
|||
name: 🚀 Release new action version
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
TAG_NAME:
|
||||
description: Tag name that the major tag will point to
|
||||
required: true
|
||||
on: [workflow_dispatch]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
@ -18,10 +10,29 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/publish-action@v0.3.0
|
||||
env:
|
||||
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
source-tag: ${{ env.TAG_NAME }}
|
||||
# Required for fetching tags and generating release notes
|
||||
fetch-depth: 0
|
||||
|
||||
- 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: 🚀 Prepare release
|
||||
run: bun run preversion
|
||||
|
||||
- name: 📜 Generate changelog and release new version
|
||||
run: |
|
||||
npx changelogen --release --push
|
||||
npx changelogen github release --token ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue