From 9a2063054a7bc1773f478f6ddcd10d75eb4f27e4 Mon Sep 17 00:00:00 2001 From: saying121 Date: Sun, 28 Apr 2024 23:33:56 +0800 Subject: [PATCH] fix(ci): add commit msg --- .github/workflows/fmt.yml | 1 + .github/workflows/release.yml | 42 ++++++++++++++++++++--------------- CHANGELOG.md | 6 +++++ 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml index dae828d..67780bd 100644 --- a/.github/workflows/fmt.yml +++ b/.github/workflows/fmt.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout/@v4 + - uses: dtolnay/rust-toolchain@master with: # my rustfmt config use many nightly features diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7877137..3c0045b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -141,25 +141,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Get sha-commit from tag - id: get_baseline_sha - shell: bash - run: | - latest_sha=$(git rev-list --tags --max-count=1) - echo "sha_tag=$latest_sha" >> "$GITHUB_OUTPUT"; - name: Install Dbus if: ${{ !matrix.cross && startsWith(matrix.os, 'ubuntu-') }} run: sudo apt update && sudo apt install libdbus-1-dev pkg-config - - name: Checkout source code to specific tag - uses: actions/checkout@v4 - with: - ref: ${{ steps.get_baseline_sha.outputs.sha_tag }} - - name: Install Nightly Rust Toolchain uses: dtolnay/rust-toolchain@master with: @@ -189,12 +175,32 @@ jobs: # ref: refs/tags/${{ needs.get-version.outputs.tag_version }} checksum: sha256 - - name: Generate completions + - uses: actions/upload-artifact@v4 if: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu' }} + with: + name: lcode + path: ./target/x86_64-unknown-linux-gnu/release/lcode + + completions: + runs-on: ubuntu-latest + needs: [build] + steps: + - uses: actions/checkout/@v4 + + - uses: actions/download-artifact@v4 + with: + merge-multiple: true + + - name: Generate completions + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMIT_MSG: | + completions(generated): update completions run: | - ./target/x86_64-unknown-linux-gnu/release/lcode --generate=zsh | tee ./completions/_lcode - ./target/x86_64-unknown-linux-gnu/release/lcode --generate=bash | tee ./completions/lcode.bash - ./target/x86_64-unknown-linux-gnu/release/lcode --generate=fish | tee ./completions/lcode.fish + # git checkout main + ./lcode --generate=zsh >./completions/_lcode + ./lcode --generate=bash >./completions/lcode.bash + ./lcode --generate=fish >./completions/lcode.fish git config user.email "actions@github" git config user.name "Github Actions" diff --git a/CHANGELOG.md b/CHANGELOG.md index 9da0cfd..bbf8d8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.8.1] - 2024-04-28 + +### Fixed + +- Cli: `lcode fzy detail` and `lcode generate` help + ## [0.8.0] - 2024-04-28 ### Added