Don't bundle binary files in the repo - build as a release step (#43)
This commit is contained in:
parent
3beea4f4a6
commit
36e4448ad2
4 changed files with 100 additions and 5 deletions
93
.github/workflows/build-and-release.yml
vendored
Normal file
93
.github/workflows/build-and-release.yml
vendored
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
name: Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
release:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Zig
|
||||
uses: mlugg/setup-zig@v2
|
||||
with:
|
||||
version: 0.14.0
|
||||
|
||||
- name: Clone pikabar source
|
||||
run: |
|
||||
git clone https://git.pika-os.com/wm-packages/pikabar.git
|
||||
|
||||
- name: Create Programs directory
|
||||
run: mkdir -p ${{ github.workspace }}/Programs
|
||||
|
||||
- name: Build zigstat
|
||||
run: |
|
||||
cd pikabar/src/zigstat
|
||||
zig build-exe src/main.zig -O ReleaseSmall -mcpu x86_64_v2 --name zigstat
|
||||
mv zigstat ${{ github.workspace }}/Programs/
|
||||
|
||||
- name: Build zigbrightness
|
||||
run: |
|
||||
cd pikabar/src/zigbrightness
|
||||
zig build-exe src/main.zig -O ReleaseSmall -mcpu x86_64_v2 --name zigbrightness
|
||||
mv zigbrightness ${{ github.workspace }}/Programs/
|
||||
|
||||
- name: Create release archive
|
||||
run: |
|
||||
# Create a clean output directory
|
||||
mkdir -p ../noctalia-release
|
||||
|
||||
# Copy all files except .git, .github, and pikabar
|
||||
cp -r . ../noctalia-release/
|
||||
rm -rf ../noctalia-release/.git
|
||||
rm -rf ../noctalia-release/.github
|
||||
rm -rf ../noctalia-release/pikabar
|
||||
|
||||
# Create the archives
|
||||
cd ..
|
||||
tar -czf noctalia-${{ github.ref_name }}.tar.gz noctalia-release/
|
||||
cp noctalia-${{ github.ref_name }}.tar.gz noctalia-latest.tar.gz
|
||||
|
||||
# Move archives to workspace
|
||||
mv *.tar.gz ${{ github.workspace }}/
|
||||
|
||||
- name: Upload Release Asset
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./noctalia-${{ github.ref_name }}.tar.gz
|
||||
asset_name: noctalia-${{ github.ref_name }}.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Upload Latest Release Asset
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./noctalia-latest.tar.gz
|
||||
asset_name: noctalia-latest.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Create Release
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
noctalia-${{ github.ref_name }}.tar.gz
|
||||
noctalia-latest.tar.gz
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Binary file not shown.
BIN
Programs/zigstat
BIN
Programs/zigstat
Binary file not shown.
12
README.md
12
README.md
|
|
@ -94,16 +94,16 @@ yay -S quickshell-git
|
|||
|
||||
or use any other way of installing quickshell-git (flake, paru etc).
|
||||
|
||||
_Git clone the repo:_
|
||||
_Download and install the latest release:_
|
||||
|
||||
```
|
||||
git clone https://github.com/Ly-sec/Noctalia.git
|
||||
mkdir -p ~/.config/quickshell && curl -sL https://github.com/Ly-sec/Noctalia/releases/latest/download/noctalia-latest.tar.gz | tar -xz --strip-components=1 -C ~/.config/quickshell/
|
||||
```
|
||||
|
||||
_Move content to ~/.config/quickshell_
|
||||
Or download manually from [releases](https://github.com/Ly-sec/Noctalia/releases) and extract:
|
||||
|
||||
```
|
||||
cd Noctalia && mv * ~/.config/quickshell/
|
||||
mkdir -p ~/.config/quickshell && tar -xzf noctalia-*.tar.gz --strip-components=1 -C ~/.config/quickshell/
|
||||
```
|
||||
|
||||
### _niri only_
|
||||
|
|
@ -177,7 +177,9 @@ You will need to install a few things to get everything working:
|
|||
- `swww` to add fancy wallpaper animations (optional)
|
||||
- `wallust` to theme the setup based on wallpaper (optional)
|
||||
|
||||
## zigstat and zigbrightnesss is bundled - source can be found [here](https://git.pika-os.com/wm-packages/pikabar/src/branch/main/src)
|
||||
## zigstat and zigbrightness
|
||||
|
||||
The zigstat and zigbrightness utilities are automatically built from source during release creation. Source code can be found [here](https://git.pika-os.com/wm-packages/pikabar/src/branch/main/src).
|
||||
|
||||
## Known issues
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue