Skip to content

Commit fc98c49

Browse files
Add CI and Workflows
1 parent 630e744 commit fc98c49

File tree

5 files changed

+44
-14
lines changed

5 files changed

+44
-14
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.github/.DS_Store

0 Bytes
Binary file not shown.

.github/workflows/preview.yml

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,42 +37,72 @@ jobs:
3737
return releases.data[0].tag_name;
3838
3939
- name: Set tag name ( Workflow Run )
40+
id: tag_run
4041
if: github.event_name == 'workflow_run'
41-
run: echo "tag_name=${{ steps.latest_tag.outputs.result }}" >> $GITHUB_ENV
42+
run: echo "tag_name=${{ steps.latest_tag.outputs.result }}" >> $GITHUB_OUTPUT
4243

4344
- name: Set tag name ( Workflow Dispatch )
45+
id: tag_dispatch
4446
if: github.event_name == 'workflow_dispatch'
45-
run: echo "tag_name=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
47+
run: echo "tag_name=${{ github.event.inputs.tag_name }}" >> $GITHUB_OUTPUT
48+
49+
- name: Set final tag name
50+
id: final_tag
51+
run: |
52+
if [ "${{ github.event_name }}" == "workflow_run" ]; then
53+
echo "tag_name=${{ steps.tag_run.outputs.tag_name }}" >> $GITHUB_OUTPUT
54+
else
55+
echo "tag_name=${{ steps.tag_dispatch.outputs.tag_name }}" >> $GITHUB_OUTPUT
56+
fi
57+
58+
- name: Debug environment variables
59+
run: |
60+
echo "Tag name: ${{ steps.final_tag.outputs.tag_name }}"
61+
echo "Event name: ${{ github.event_name }}"
4662
4763
- name: Download binary
4864
run: |
49-
curl -LO "https://github.com/${{ github.repository }}/releases/download/${{ env.tag_name }}/macutil"
65+
curl -LO "https://github.com/${{ github.repository }}/releases/download/${{ steps.final_tag.outputs.tag_name }}/macutil"
5066
5167
- name: Set env
68+
id: branch_setup
5269
run: |
5370
chmod +x macutil
5471
mkdir -p build
5572
mv macutil build/macutil
5673
echo "${{ github.workspace }}/build" >> $GITHUB_PATH
57-
echo "branch_name=${{ env.tag_name }}" | tr . - >> $GITHUB_ENV
74+
branch_name=$(echo "${{ steps.final_tag.outputs.tag_name }}" | tr . -)
75+
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
5876
59-
- name: Generate preview
60-
uses: charmbracelet/[email protected]
61-
with:
62-
path: ".github/preview.tape"
77+
- name: Install dependencies manually
78+
run: |
79+
sudo apt-get update
80+
sudo apt-get install -y ffmpeg
81+
82+
- name: Install VHS directly
83+
run: |
84+
# Download and install VHS from releases
85+
curl -LO "https://github.com/charmbracelet/vhs/releases/latest/download/vhs_Linux_x86_64.tar.gz"
86+
tar -xzf vhs_Linux_x86_64.tar.gz
87+
sudo mv vhs /usr/local/bin/vhs
88+
chmod +x /usr/local/bin/vhs
89+
90+
- name: Generate preview with VHS
91+
run: |
92+
vhs .github/preview.tape
6393
6494
- name: Move preview
6595
run: mv preview.gif .github/preview.gif
6696

6797
- name: Create PR
6898
uses: peter-evans/[email protected]
6999
with:
70-
commit-message: Preview for ${{ env.tag_name }}
71-
branch: preview-${{ env.branch_name }}
72-
title: "Update preview for ${{ env.tag_name }}"
100+
commit-message: Preview for ${{ steps.final_tag.outputs.tag_name }}
101+
branch: preview-${{ steps.branch_setup.outputs.branch_name }}
102+
title: "Update preview for ${{ steps.final_tag.outputs.tag_name }}"
73103
labels: |
74104
documentation
75105
body: |
76-
Automated PR to update preview gif for version ${{ env.tag_name }}
77-
![preview](https://raw.githubusercontent.com/${{ github.repository }}/preview-${{ env.branch_name }}/.github/preview.gif)
106+
Automated PR to update preview gif for version ${{ steps.final_tag.outputs.tag_name }}
107+
![preview](https://raw.githubusercontent.com/${{ github.repository }}/preview-${{ steps.branch_setup.outputs.branch_name }}/.github/preview.gif)
78108
if: success()

target/.rustc_info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"rustc_fingerprint":1476785559721132811,"outputs":{"12016735552878863467":{"success":true,"status":"","code":0,"stdout":"rustc 1.88.0 (6b00bc388 2025-06-23) (Homebrew)\nbinary: rustc\ncommit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc\ncommit-date: 2025-06-23\nhost: aarch64-apple-darwin\nrelease: 1.88.0\nLLVM version: 20.1.7\n","stderr":""},"13822592305234237280":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/opt/homebrew/Cellar/rust/1.88.0\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"aes\"\ntarget_feature=\"crc\"\ntarget_feature=\"dit\"\ntarget_feature=\"dotprod\"\ntarget_feature=\"dpb\"\ntarget_feature=\"dpb2\"\ntarget_feature=\"fcma\"\ntarget_feature=\"fhm\"\ntarget_feature=\"flagm\"\ntarget_feature=\"fp16\"\ntarget_feature=\"frintts\"\ntarget_feature=\"jsconv\"\ntarget_feature=\"lor\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"paca\"\ntarget_feature=\"pacg\"\ntarget_feature=\"pan\"\ntarget_feature=\"pmuv3\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rcpc2\"\ntarget_feature=\"rdm\"\ntarget_feature=\"sb\"\ntarget_feature=\"sha2\"\ntarget_feature=\"sha3\"\ntarget_feature=\"ssbs\"\ntarget_feature=\"vh\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""}},"successes":{}}
1+
{"rustc_fingerprint":11293092447381577908,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.88.0 (6b00bc388 2025-06-23) (Homebrew)\nbinary: rustc\ncommit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc\ncommit-date: 2025-06-23\nhost: aarch64-apple-darwin\nrelease: 1.88.0\nLLVM version: 20.1.7\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/opt/homebrew/Cellar/rust/1.88.0\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"aes\"\ntarget_feature=\"crc\"\ntarget_feature=\"dit\"\ntarget_feature=\"dotprod\"\ntarget_feature=\"dpb\"\ntarget_feature=\"dpb2\"\ntarget_feature=\"fcma\"\ntarget_feature=\"fhm\"\ntarget_feature=\"flagm\"\ntarget_feature=\"fp16\"\ntarget_feature=\"frintts\"\ntarget_feature=\"jsconv\"\ntarget_feature=\"lor\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"paca\"\ntarget_feature=\"pacg\"\ntarget_feature=\"pan\"\ntarget_feature=\"pmuv3\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rcpc2\"\ntarget_feature=\"rdm\"\ntarget_feature=\"sb\"\ntarget_feature=\"sha2\"\ntarget_feature=\"sha3\"\ntarget_feature=\"ssbs\"\ntarget_feature=\"vh\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""}},"successes":{}}

target/debug/macutil

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)