mirror of
https://github.com/harivansh-afk/deskctl.git
synced 2026-04-15 05:02:08 +00:00
reorder pipeline
This commit is contained in:
parent
8d690a62b4
commit
a58912284b
1 changed files with 47 additions and 29 deletions
76
.github/workflows/ci.yml
vendored
76
.github/workflows/ci.yml
vendored
|
|
@ -28,6 +28,9 @@ on:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
|
|
@ -186,38 +189,12 @@ jobs:
|
||||||
- name: Distribution validation
|
- name: Distribution validation
|
||||||
run: make dist-validate
|
run: make dist-validate
|
||||||
|
|
||||||
build:
|
# --- Release pipeline: update-manifests -> build -> release -> publish ---
|
||||||
name: Build Release Asset
|
# Version bump happens BEFORE build so the binary has the correct version.
|
||||||
needs: [changes, validate, integration, distribution]
|
|
||||||
if: github.event_name != 'pull_request' && needs.changes.outputs.rust == 'true'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
components: clippy
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y libx11-dev libxtst-dev
|
|
||||||
|
|
||||||
- name: Clippy
|
|
||||||
run: cargo clippy -- -D warnings
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --release --locked
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: deskctl-linux-x86_64
|
|
||||||
path: target/release/deskctl
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
update-manifests:
|
update-manifests:
|
||||||
name: Update Manifests
|
name: Update Manifests
|
||||||
needs: [changes, build]
|
needs: [changes, validate, integration, distribution]
|
||||||
if: github.event_name != 'pull_request' && needs.changes.outputs.rust == 'true'
|
if: github.event_name != 'pull_request' && needs.changes.outputs.rust == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -258,6 +235,47 @@ jobs:
|
||||||
git tag "${{ needs.changes.outputs.tag }}"
|
git tag "${{ needs.changes.outputs.tag }}"
|
||||||
git push origin main --tags
|
git push origin main --tags
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build Release Asset
|
||||||
|
needs: [changes, update-manifests]
|
||||||
|
if: github.event_name != 'pull_request' && needs.changes.outputs.rust == 'true'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.changes.outputs.tag }}
|
||||||
|
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: clippy
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: sudo apt-get update && sudo apt-get install -y libx11-dev libxtst-dev
|
||||||
|
|
||||||
|
- name: Verify version
|
||||||
|
run: |
|
||||||
|
CARGO_VER=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
|
||||||
|
EXPECTED="${{ needs.changes.outputs.version }}"
|
||||||
|
if [ "$CARGO_VER" != "$EXPECTED" ]; then
|
||||||
|
echo "Version mismatch: Cargo.toml=$CARGO_VER expected=$EXPECTED"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Building version $CARGO_VER"
|
||||||
|
|
||||||
|
- name: Clippy
|
||||||
|
run: cargo clippy -- -D warnings
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --release --locked
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: deskctl-linux-x86_64
|
||||||
|
path: target/release/deskctl
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
needs: [changes, build, update-manifests]
|
needs: [changes, build, update-manifests]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue