name: Nightly Builds
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
nightly:
name: Build Nightly Release
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Rust with caching
uses: ./.github/actions/setup-rust-cached
with:
toolchain: nightly
cache-key: nightly
- name: Build nightly
run: cargo +nightly build --release --all-features
- name: Package binary
run: |
cd target/release
tar czf rust-template-nightly-linux-x64.tar.gz rust-template
shasum -a 256 rust-template-nightly-linux-x64.tar.gz > rust-template-nightly-linux-x64.tar.gz.sha256
- name: Delete old nightly release
run: gh release delete nightly --yes || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create nightly release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b with:
tag_name: nightly
name: Nightly Build
prerelease: true
body: |
Automated nightly build from latest main branch.
⚠️ **Warning:** Nightly builds may be unstable.
Built from commit: ${{ github.sha }}
Build date: ${{ github.event.repository.updated_at }}
files: |
target/release/rust-template-nightly-*.tar.gz
target/release/rust-template-nightly-*.sha256