Skip to content

fixup! ci: initial wip release process #40

fixup! ci: initial wip release process

fixup! ci: initial wip release process #40

Workflow file for this run

name: Release Branch Workflow
on:
push:
branches:
- main
- beta
- alpha
- "*.x"
- "jg/release-setup"
concurrency:
group: release-${{ github.ref }}
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
jobs:
get-next-version:
uses: semantic-release-action/next-release-version/.github/workflows/next-release-version.yml@v4
validate-rust:
name: Rust
needs:
- get-next-version
if: needs.get-next-version.outputs.new-release-published == 'true'
runs-on: ubuntu-latest
steps:
- run: echo "Rust validate checks go here"
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
# - id: validate-rust-action
# uses: ./.github/actions/validate-rust-action
validate-dependencies:
runs-on: ubuntu-latest
needs:
- get-next-version
if: needs.get-next-version.outputs.new-release-published == 'true'
strategy:
matrix:
checks:
- advisories
- bans licenses sources
# NOTE: Prevent sudden announcement of a new advisory from failing ci
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- run: echo "Cargo deny check goes here"
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
# - uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 #v2.0.11
# with:
# command: check ${{ matrix.checks }}
validate-python:
runs-on: ubuntu-latest
name: Check included python drivers
needs:
- get-next-version
if: needs.get-next-version.outputs.new-release-published == 'true'
strategy:
matrix:
projects: ["drivers/hypha-accelerate-driver", "drivers/aim-driver"]
steps:
- run: echo "Python checks go here"
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
# - id: validate-python-project-uv-action
# uses: ./.github/actions/validate-python-project-uv-action
# with:
# project-path: ${{ matrix.projects }}
build-python:
runs-on: ubuntu-latest
name: Build Python projects
needs:
- validate-python
strategy:
matrix:
projects: ["drivers/hypha-accelerate-driver", "drivers/aim-driver"]
steps:
- run: echo "Python build process goes here"
# - uses: actions/checkout@v5
# - id: hello-world-composite-action
# uses: ./.github/actions/hello-world-composite-action
# with:
# who-to-greet: "Mona the Octocat"
# - run: echo random-number "$RANDOM_NUMBER"
# shell: bash
# env:
# RANDOM_NUMBER: ${{ steps.hello-world-composite-action.outputs.random-number }}
build-rust:
runs-on: ubuntu-latest
name: Build rust project
needs:
- get-next-version
- validate-rust
- validate-dependencies
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Install cargo-edit
run: cargo install cargo-edit
- name: Set version from semantic-release
run: cargo set-version ${{ needs.get-next-version.outputs.new-release-version }}
- name: Build
run: cargo build -r
- name: Upload artifact from build job
uses: actions/upload-artifact@v4
with:
name: build-output
path: |
target/release/hypha-gateway
target/release/hypha-worker
target/release/hypha-data
target/release/hypha-scheduler
target/release/hypha-certutil
github-release:
runs-on: ubuntu-latest
name: Release
needs:
- build-python
- build-rust
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: lts/*
- name: Install semantic-release
run: npm install -g semantic-release@24 # same version as the action above
- name: Download release artifacts
uses: actions/download-artifact@v6
with:
name: build-output
path: artifacts
- name: ls artifacts
run: ls -R ./artifacts
- name: Invoke semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
publish-pypi:
runs-on: ubuntu-latest
name: Publish to PyPi
needs:
- get-next-version
- github-release
steps:
- run: echo "python publishing step goes here"
publish-crates:
runs-on: ubuntu-latest
name: Publish to crates.io
needs:
- get-next-version
- github-release
steps:
- run: echo "crates publishing step goes here"