Skip to content

Commit

Permalink
Refactor GitHub workflows for improved checks and releases
Browse files Browse the repository at this point in the history
- Rename and restructure GitHub Actions workflows for improved clarity and functionality.
- Streamline the check workflow by removing chagelog generation and release steps, focusing on code quality checks.
- Enhance the release workflow by integrating automated changelog generation and improving release notes.
  • Loading branch information
zhongweili committed Dec 7, 2024
1 parent 73674d7 commit a9fcd2d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/build.yml → .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: check

on:
push:
Expand All @@ -14,7 +14,7 @@ permissions:
contents: write

jobs:
build-rust:
check-rust:
strategy:
matrix:
platform: [ubuntu-latest]
Expand Down Expand Up @@ -46,17 +46,3 @@ jobs:
run: cd src-tauri && cargo clippy --all-targets --all-features --tests --benches -- -D warnings
- name: Execute rust tests
run: cd src-tauri && cargo nextest run --all-features --no-tests=pass
- name: Generate a changelog
uses: orhun/git-cliff-action@v2
id: git-cliff
if: startsWith(github.ref, 'refs/tags/')
with:
config: cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGES.md
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{ steps.git-cliff.outputs.content }}
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,23 @@ jobs:
- name: install frontend dependencies
run: yarn install

- name: Generate a changelog
uses: orhun/git-cliff-action@v2
id: git-cliff
if: startsWith(github.ref, 'refs/tags/')
with:
config: cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGES.md

- 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.'
releaseBody: ${{ steps.git-cliff.outputs.content }}
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}

0 comments on commit a9fcd2d

Please sign in to comment.