forked from herocode/horus
Update .gitea/workflows/release.yml
This commit is contained in:
@@ -9,23 +9,26 @@ jobs:
|
|||||||
build-release:
|
build-release:
|
||||||
name: Build Release Binaries
|
name: Build Release Binaries
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
# Make sure warnings never fail the release build
|
||||||
|
RUSTFLAGS: "--cap-lints=warn"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Rust toolchain
|
- name: Setup Rust toolchain
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
id: version
|
id: version
|
||||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Build release binaries
|
- name: Build release binaries
|
||||||
run: cargo build --workspace --release --verbose
|
run: cargo build --workspace --release --verbose
|
||||||
|
|
||||||
- name: Strip binaries
|
- name: Strip binaries
|
||||||
run: |
|
run: |
|
||||||
strip target/release/supervisor || true
|
strip target/release/supervisor || true
|
||||||
@@ -35,13 +38,12 @@ jobs:
|
|||||||
strip target/release/herorunner || true
|
strip target/release/herorunner || true
|
||||||
strip target/release/runner_osiris || true
|
strip target/release/runner_osiris || true
|
||||||
strip target/release/runner_sal || true
|
strip target/release/runner_sal || true
|
||||||
|
|
||||||
- name: Create release directory
|
- name: Create release directory
|
||||||
run: mkdir -p release-artifacts
|
run: mkdir -p release-artifacts
|
||||||
|
|
||||||
- name: Package binaries
|
- name: Package binaries
|
||||||
run: |
|
run: |
|
||||||
# Package each binary as a tarball
|
|
||||||
for binary in supervisor coordinator horus osiris herorunner runner_osiris runner_sal; do
|
for binary in supervisor coordinator horus osiris herorunner runner_osiris runner_sal; do
|
||||||
if [ -f "target/release/$binary" ]; then
|
if [ -f "target/release/$binary" ]; then
|
||||||
tar -czf "release-artifacts/${binary}-${{ steps.version.outputs.VERSION }}-linux-x86_64.tar.gz" \
|
tar -czf "release-artifacts/${binary}-${{ steps.version.outputs.VERSION }}-linux-x86_64.tar.gz" \
|
||||||
@@ -51,23 +53,24 @@ jobs:
|
|||||||
echo "Warning: $binary not found, skipping"
|
echo "Warning: $binary not found, skipping"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Generate checksums
|
- name: Generate checksums
|
||||||
run: |
|
run: |
|
||||||
cd release-artifacts
|
cd release-artifacts
|
||||||
sha256sum *.tar.gz > checksums.txt
|
sha256sum *.tar.gz > checksums.txt
|
||||||
cat checksums.txt
|
cat checksums.txt
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: actions/gitea-release@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
# or your mirror, e.g. actions/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
files: release-artifacts/*
|
files: release-artifacts/*
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }} # make sure this PAT exists in Gitea
|
||||||
tag_name: ${{ steps.version.outputs.VERSION }}
|
tag_name: ${{ steps.version.outputs.VERSION }}
|
||||||
name: Release ${{ steps.version.outputs.VERSION }}
|
name: Release ${{ steps.version.outputs.VERSION }}
|
||||||
body: |
|
body: |
|
||||||
## Horus Release ${{ steps.version.outputs.VERSION }}
|
## Horus Release ${{ steps.version.outputs.VERSION }}
|
||||||
|
|
||||||
### Binaries
|
### Binaries
|
||||||
This release includes the following binaries for Linux x86_64:
|
This release includes the following binaries for Linux x86_64:
|
||||||
- `supervisor` - Hero Supervisor service
|
- `supervisor` - Hero Supervisor service
|
||||||
@@ -77,7 +80,7 @@ jobs:
|
|||||||
- `herorunner` - Hero runner
|
- `herorunner` - Hero runner
|
||||||
- `runner_osiris` - Osiris runner
|
- `runner_osiris` - Osiris runner
|
||||||
- `runner_sal` - SAL runner
|
- `runner_sal` - SAL runner
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
Download the appropriate binary for your system:
|
Download the appropriate binary for your system:
|
||||||
```bash
|
```bash
|
||||||
@@ -87,13 +90,13 @@ jobs:
|
|||||||
chmod +x supervisor
|
chmod +x supervisor
|
||||||
sudo mv supervisor /usr/local/bin/
|
sudo mv supervisor /usr/local/bin/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Verification
|
### Verification
|
||||||
Verify the integrity of downloaded files using the checksums:
|
Verify the integrity of downloaded files using the checksums:
|
||||||
```bash
|
```bash
|
||||||
sha256sum -c checksums.txt
|
sha256sum -c checksums.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
See commit history for detailed changes in this release.
|
See commit history for detailed changes in this release.
|
||||||
draft: false
|
draft: false
|
||||||
|
|||||||
Reference in New Issue
Block a user