Skip to content

Commit

Permalink
ci: generate files in PR (#638)
Browse files Browse the repository at this point in the history
Co-authored-by: LoricAndre <loric.andre@pm.me>
  • Loading branch information
LoricAndre and LoricAndre authored Dec 1, 2024
1 parent 45f0c36 commit 05e7842
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 31 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,29 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: .github/pr-title-checker-config.json
generate-files:
runs-on: ubuntu-22.04
needs: setup-release
permissions:
contents: write
steps:
- name: Checkout Git repo
uses: actions/checkout@v4
- name: Install correct toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Generate manpage
uses: actions-rs/cargo@v1
with:
command: run
args: --package xtask mangen
- name: Generate completions
uses: actions-rs/cargo@v1
with:
command: run
args: --package xtask compgen
- name: Push modified files
run: |
git commit -am 'chore: generate completions & manpage'
git push origin HEAD
45 changes: 14 additions & 31 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ jobs:
os: apple-darwin
runs-on: ${{ contains(matrix.os, 'apple') && 'macos' || 'ubuntu' }}-latest
steps:
- name: "[linux] Install dependencies"
run: |
sudo apt-get install tmux
tmux -V
locale
if: runner.os == 'Linux'
- name: "[macos] Install dependencies"
run: |
brew install tmux
tmux -V
locale
if: runner.os == 'macOS'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -108,37 +122,6 @@ jobs:
name: binary-${{ matrix.arch }}-${{ matrix.os }}
path: "skim-*.tgz"
retention-days: 1
release-files:
runs-on: ubuntu-22.04
needs: setup-release
steps:
- name: Checkout Git repo
uses: actions/checkout@v4
- name: Install correct toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Generate manpage
uses: actions-rs/cargo@v1
with:
command: run
args: --package xtask mangen
- name: Generate completions
uses: actions-rs/cargo@v1
with:
command: run
args: --package xtask compgen
- name: Create release archives
run: |
mkdir artifacts
tar -C man -czvf artifacts/man.tgz man1
tar -C shell -czvf artifacts/shell.tgz .
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: files
path: "artifacts/*.tgz"
retention-days: 1
release-artifacts:
permissions:
contents: write
Expand Down

0 comments on commit 05e7842

Please sign in to comment.