Skip to content

Commit

Permalink
fix(ci): add commit msg
Browse files Browse the repository at this point in the history
ci(release): gen completions
  • Loading branch information
saying121 committed Apr 29, 2024
1 parent 78edd8e commit 196713e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
49 changes: 31 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -189,12 +175,39 @@ 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: |
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: |
./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
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"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 196713e

Please sign in to comment.