ci: ajout job release — build multi-arch + release auto sur tag
Build sur tags v*: linux x86_64, linux arm64, windows x86_64. Release Gitea créée automatiquement avec les 3 binaires attachés.
This commit is contained in:
@@ -3,6 +3,7 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
tags: ['v*']
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
@@ -29,3 +30,52 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
./ntfy-bridge --version
|
./ntfy-bridge --version
|
||||||
./ntfy-bridge --help
|
./ntfy-bridge --help
|
||||||
|
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
needs: test
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install V
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 https://github.com/vlang/v /opt/v
|
||||||
|
cd /opt/v && make
|
||||||
|
ln -s /opt/v/v /usr/local/bin/v
|
||||||
|
|
||||||
|
- name: Build Linux x86_64
|
||||||
|
run: v -prod -os linux -arch amd64 -o build/ntfy-bridge-linux-x86_64 .
|
||||||
|
|
||||||
|
- name: Build Linux arm64 (Raspberry Pi)
|
||||||
|
run: v -prod -os linux -arch arm64 -o build/ntfy-bridge-linux-arm64 .
|
||||||
|
|
||||||
|
- name: Build Windows x86_64
|
||||||
|
run: v -prod -os windows -arch amd64 -o build/ntfy-bridge-windows-x86_64.exe .
|
||||||
|
|
||||||
|
- name: Create Gitea Release
|
||||||
|
uses: https://gitea.com/actions/release-action@v1
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
build/ntfy-bridge-linux-x86_64
|
||||||
|
build/ntfy-bridge-linux-arm64
|
||||||
|
build/ntfy-bridge-windows-x86_64.exe
|
||||||
|
body: |
|
||||||
|
## ntfy-bridge ${GITHUB_REF##*/}
|
||||||
|
|
||||||
|
Binaires statiques prêts à l'emploi — zéro dépendance.
|
||||||
|
|
||||||
|
### Téléchargements
|
||||||
|
- **Linux x86_64** : `ntfy-bridge-linux-x86_64`
|
||||||
|
- **Linux arm64** (Raspberry Pi) : `ntfy-bridge-linux-arm64`
|
||||||
|
- **Windows x86_64** : `ntfy-bridge-windows-x86_64.exe`
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
```bash
|
||||||
|
chmod +x ntfy-bridge-linux-x86_64
|
||||||
|
sudo mv ntfy-bridge-linux-x86_64 /usr/local/bin/ntfy-bridge
|
||||||
|
ntfy-bridge --install-service
|
||||||
|
```
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user