Skip to content

Commit

Permalink
ci(action): try to merge changelog and assets
Browse files Browse the repository at this point in the history
  • Loading branch information
litingyes committed Dec 8, 2024
1 parent 7853341 commit c221a2a
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 16 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 9.14.4
Expand All @@ -42,25 +44,20 @@ jobs:
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- run: pnpm install
- name: Generate CHANGELOG
id: generate-changelog
run: |
tags=$(git tag --sort=-creatordate | head -n 2)
to=$(echo "$tags" | sed -n 1p)
from=$(echo "$tags" | sed -n 2p)
changelog=$(pnpm changelogen@latest --from="$from" --to="$to" --no-output)
echo "CHANGELOG=$changelog" >> $GITHUB_ENV
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__
releaseName: App v__VERSION__
releaseBody: See the assets to download this version and install.
tagName: v__VERSION__
releaseName: v__VERSION__
releaseBody: ${{ env.CHANGELOG }}
prerelease: false
args: ${{ matrix.args }}
changelog:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@types/react-dom": "^18.2.7",
"@unocss/eslint-plugin": "^0.64.1",
"bumpp": "^9.8.1",
"changelogen": "^0.5.7",
"eslint": "^9.15.0",
"eslint-plugin-format": "^0.1.2",
"eslint-plugin-react-hooks": "^5.0.0",
Expand Down
117 changes: 117 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c221a2a

Please sign in to comment.