Files
gitea_mirror/.github/workflows/ci.yml
hak8or 54ae040fd4
All checks were successful
Cargo Build & Test / Build - ubuntu-latest (push) Successful in 3m33s
Cargo Build & Test / Build - ubuntu-22.04 (push) Successful in 3m53s
ci: add ubuntu-22.04 build target and versioned artifacts
2026-01-14 23:37:50 -05:00

47 lines
1.6 KiB
YAML

name: Cargo Build & Test
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build_latest:
name: Build - ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: rustup update 1.90 && rustup default 1.90
- run: cargo build
- run: cargo build --release
- name: Rename binary
if: github.ref_type == 'tag'
run: mv target/release/gitea_mirror target/release/gitea_mirror-${{ github.ref_name }}-ubuntu-latest
- name: Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
files: target/release/gitea_mirror-${{ github.ref_name }}-ubuntu-latest
build_legacy:
name: Build - ubuntu-22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: rustup update 1.90 && rustup default 1.90
- run: cargo build
- run: cargo build --release
- name: Rename binary
if: github.ref_type == 'tag'
run: mv target/release/gitea_mirror target/release/gitea_mirror-${{ github.ref_name }}-ubuntu-22.04
- name: Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
files: target/release/gitea_mirror-${{ github.ref_name }}-ubuntu-22.04