Skip to content

Commit

Permalink
Merge branch 'main' of ssh://github.com/ChrisTitusTech/linutil into g…
Browse files Browse the repository at this point in the history
…eneric-popup-title
  • Loading branch information
afonsofrancof committed Oct 3, 2024
2 parents 77962e2 + 26d0adc commit 34ffbc5
Show file tree
Hide file tree
Showing 62 changed files with 1,401 additions and 974 deletions.
66 changes: 0 additions & 66 deletions .github/release-drafter.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
changelog:
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '📚 Documentation'
label: 'documentation'
- title: '🔒 Security'
label: 'security'
- title: '🧰 GitHub Actions'
label: 'github actions'
exclude:
labels:
- 'skip-changelog'
24 changes: 17 additions & 7 deletions .github/workflows/bashisms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,27 @@ jobs:
id: get_sh_files
run: |
sh_files=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs | grep '\.sh$' || true)
echo "::set-output name=sh_files::$sh_files"
if [ -n "$sh_files" ]; then
echo "$sh_files" > changed_files
echo "changed=1" >> $GITHUB_OUTPUT
else
echo "changed=0" >> $GITHUB_OUTPUT
fi
- name: Install devscripts
if: steps.get_sh_files.outputs.sh_files != ''
if: steps.get_sh_files.outputs.changed == 1
run: sudo apt-get update && sudo apt-get install devscripts

- name: Check for bashisms
if: steps.get_sh_files.outputs.sh_files != ''
if: steps.get_sh_files.outputs.changed == 1
run: |
for file in ${{ steps.get_sh_files.outputs.sh_files }}; do
if [[ -f "$file" ]]; then
checkbashisms "$file"
fi
echo "Running for:\n$(cat changed_files)\n"
for file in $(cat changed_files); do
if [[ -f "$file" ]]; then
checkbashisms "$file"
fi
done
- name: Remove the created file
if: steps.get_sh_files.outputs.changed == 1
run: rm changed_files
42 changes: 22 additions & 20 deletions .github/workflows/linutil.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: LinUtil Release

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -55,12 +53,6 @@ jobs:
mv build/x86_64-unknown-linux-musl/release/linutil build/linutil
mv build/aarch64-unknown-linux-musl/release/linutil build/linutil-aarch64
- name: Pull latest changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git pull origin main
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Commit Linutil
Expand All @@ -75,28 +67,18 @@ jobs:
echo "version=$version" >> $GITHUB_ENV
shell: bash

- name: Generate Release Notes
id: generate_notes
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
config-name: release-drafter.yml
version: ${{ env.version }}

- name: Create and Upload Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.version }}
name: Pre-Release ${{ env.version }}
body: |
${{ steps.generate_notes.outputs.body }}
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil)
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil-aarch64)
append_body: false
append_body: true
generate_release_notes: true
files: |
./build/linutil
./build/linutil-aarch64
Expand All @@ -106,3 +88,23 @@ jobs:
env:
version: ${{ env.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install vhs
run: |
wget 'https://github.com/charmbracelet/vhs/releases/download/v0.8.0/vhs_0.8.0_amd64.deb'
sudo apt install -y ffmpeg
sudo snap install ttyd --classic
sudo dpkg -i 'vhs_0.8.0_amd64.deb'
- name: Build the preview
run: |
export PATH="$(pwd)/build:$PATH"
vhs docs/assets/preview.tape -o docs/assets/preview.gif
- name: Upload the preview
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Preview for ${{ env.version }}
file_pattern: "docs/assets/preview.gif"
add_options: "--force"
if: success()
Loading

0 comments on commit 34ffbc5

Please sign in to comment.