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..6d3a900 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} run: - cargo release publish --allow-branch HEAD --no-confirm --workspace -x + cargo release publish --allow-branch HEAD --no-confirm --workspace -x || echo "No crates publish." create-release: # needs: [publish] @@ -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,16 +175,48 @@ jobs: # ref: refs/tags/${{ needs.get-version.outputs.tag_version }} checksum: sha256 - - name: Generate completions + - name: tar if: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu' }} 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 + cp ./target/x86_64-unknown-linux-gnu/release/lcode ./lcode + tar -cvf lcode.tar ./lcode + + - uses: actions/upload-artifact@v4 + if: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu' }} + with: + name: lcode.tar + path: lcode.tar + + 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: | + tar -xvf lcode.tar + # 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" git remote set-url origin https://x-access-token:"${GITHUB_TOKEN}"@github.com/"${GITHUB_REPOSITORY}".git git add completions/ + + git tag + git log 2 + + echo "${GITHUB_REF}" # shellcheck disable=SC2015 - git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:"${GITHUB_REF}") + git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push --verbose) 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