Skip to content

Commit 196713e

Browse files
author
saying121
committed
fix(ci): add commit msg
ci(release): gen completions
1 parent 78edd8e commit 196713e

File tree

3 files changed

+38
-18
lines changed

3 files changed

+38
-18
lines changed

.github/workflows/fmt.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout/@v4
14+
1415
- uses: dtolnay/rust-toolchain@master
1516
with:
1617
# my rustfmt config use many nightly features

.github/workflows/release.yml

+31-18
Original file line numberDiff line numberDiff line change
@@ -141,25 +141,11 @@ jobs:
141141
steps:
142142
- name: Checkout
143143
uses: actions/checkout@v4
144-
with:
145-
fetch-depth: 0
146-
147-
- name: Get sha-commit from tag
148-
id: get_baseline_sha
149-
shell: bash
150-
run: |
151-
latest_sha=$(git rev-list --tags --max-count=1)
152-
echo "sha_tag=$latest_sha" >> "$GITHUB_OUTPUT";
153144

154145
- name: Install Dbus
155146
if: ${{ !matrix.cross && startsWith(matrix.os, 'ubuntu-') }}
156147
run: sudo apt update && sudo apt install libdbus-1-dev pkg-config
157148

158-
- name: Checkout source code to specific tag
159-
uses: actions/checkout@v4
160-
with:
161-
ref: ${{ steps.get_baseline_sha.outputs.sha_tag }}
162-
163149
- name: Install Nightly Rust Toolchain
164150
uses: dtolnay/rust-toolchain@master
165151
with:
@@ -189,12 +175,39 @@ jobs:
189175
# ref: refs/tags/${{ needs.get-version.outputs.tag_version }}
190176
checksum: sha256
191177

192-
- name: Generate completions
178+
- name: tar
179+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu' }}
180+
run: |
181+
cp ./target/x86_64-unknown-linux-gnu/release/lcode ./lcode
182+
tar -cvf lcode.tar ./lcode
183+
184+
- uses: actions/upload-artifact@v4
193185
if: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu' }}
186+
with:
187+
name: lcode.tar
188+
path: lcode.tar
189+
190+
completions:
191+
runs-on: ubuntu-latest
192+
needs: [build]
193+
steps:
194+
- uses: actions/checkout/@v4
195+
196+
- uses: actions/download-artifact@v4
197+
with:
198+
merge-multiple: true
199+
200+
- name: Generate completions
201+
env:
202+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
203+
COMMIT_MSG: |
204+
completions(generated): update completions
194205
run: |
195-
./target/x86_64-unknown-linux-gnu/release/lcode --generate=zsh | tee ./completions/_lcode
196-
./target/x86_64-unknown-linux-gnu/release/lcode --generate=bash | tee ./completions/lcode.bash
197-
./target/x86_64-unknown-linux-gnu/release/lcode --generate=fish | tee ./completions/lcode.fish
206+
tar -xvf lcode.tar
207+
# git checkout main
208+
./lcode --generate=zsh >./completions/_lcode
209+
./lcode --generate=bash >./completions/lcode.bash
210+
./lcode --generate=fish >./completions/lcode.fish
198211
199212
git config user.email "actions@github"
200213
git config user.name "Github Actions"

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [0.8.1] - 2024-04-28
10+
11+
### Fixed
12+
13+
- Cli: `lcode fzy detail` and `lcode generate` help
14+
915
## [0.8.0] - 2024-04-28
1016

1117
### Added

0 commit comments

Comments
 (0)