mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
44 lines
1019 B
YAML
44 lines
1019 B
YAML
name: Release for new tag
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0 # Fetch all history for generating release notes
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: .nvmrc
|
|
cache: pnpm
|
|
|
|
- name: Split theme configuration
|
|
run: |
|
|
pnpx fixit-cli split hugo.toml
|
|
tar -zcvf config.tar.gz config
|
|
tree config
|
|
|
|
- name: Generate release notes
|
|
run: |
|
|
pnpm install --frozen-lockfile
|
|
pnpm changelog --starting-version ${{ github.ref_name }}
|
|
sed -i '1,4d' CHANGELOG.md
|
|
|
|
- name: GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
draft: true
|
|
body_path: CHANGELOG.md
|
|
files: |
|
|
config.tar.gz
|