v1.8.4 #24
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Project: hyperi-rustlib | |
| # File: .github/workflows/publish.yml | |
| # Purpose: Rust Publish pipeline - Build, Publish crate and/or binaries | |
| # License: FSL-1.1-ALv2 | |
| # Copyright: (c) 2026 HYPERI PTY LIMITED | |
| # | |
| # Generated by: HyperI CI attach.sh (rust) | |
| # CI Repo: https://github.com/hyperi-io/ci | |
| # | |
| # IMPORTANT: Before triggering CI, always run a local build first: | |
| # cargo fmt --check && cargo clippy --all-features && cargo test --all-features | |
| name: Publish | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| detect: | |
| name: Detect Config | |
| runs-on: ${{ vars.GH_RUNNER_DEFAULT || 'ubuntu-latest' }} | |
| outputs: | |
| build_type: ${{ steps.config.outputs.build_type }} | |
| publish_binaries: ${{ steps.config.outputs.publish_binaries }} | |
| binaries_repo: ${{ steps.config.outputs.binaries_repo }} | |
| rust_targets: ${{ steps.config.outputs.rust_targets }} | |
| rust_features: ${{ steps.config.outputs.rust_features }} | |
| container_enabled: ${{ steps.config.outputs.container_enabled }} | |
| container_registry: ${{ steps.config.outputs.container_registry }} | |
| container_dockerfile: ${{ steps.config.outputs.container_dockerfile }} | |
| container_context: ${{ steps.config.outputs.container_context }} | |
| container_platforms: ${{ steps.config.outputs.container_platforms }} | |
| helm_enabled: ${{ steps.config.outputs.helm_enabled }} | |
| helm_chart_path: ${{ steps.config.outputs.helm_chart_path }} | |
| helm_registry_url: ${{ steps.config.outputs.helm_registry_url }} | |
| steps: | |
| - name: Generate token | |
| id: token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| token: ${{ steps.token.outputs.token }} | |
| - uses: ./ci/actions/setup/detect-build-config | |
| id: config | |
| with: | |
| scripts-path: ./ci/scripts | |
| build: | |
| name: Build | |
| needs: detect | |
| runs-on: ${{ vars.GH_RUNNER_DEFAULT || 'ubuntu-latest' }} | |
| steps: | |
| - name: Generate token | |
| id: token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| token: ${{ steps.token.outputs.token }} | |
| - uses: ./ci/actions/jobs/build | |
| with: | |
| language: rust | |
| artifactory-url: ${{ vars.ARTIFACTORY_CARGO_URL }} | |
| artifactory-username: ${{ secrets.ARTIFACTORY_CI_USERNAME }} | |
| artifactory-password: ${{ secrets.ARTIFACTORY_CI_TOKEN }} | |
| rust-targets: ${{ needs.detect.outputs.rust_targets }} | |
| rust-features: ${{ needs.detect.outputs.rust_features }} | |
| build-type: ${{ needs.detect.outputs.build_type }} | |
| publish: | |
| name: Publish | |
| needs: [detect, build] | |
| runs-on: ${{ vars.GH_RUNNER_DEFAULT || 'ubuntu-latest' }} | |
| permissions: | |
| contents: write | |
| packages: write # Required for GHCR container/Helm push | |
| steps: | |
| - name: Generate token | |
| id: token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| token: ${{ steps.token.outputs.token }} | |
| - uses: ./ci/actions/jobs/publish | |
| with: | |
| language: rust | |
| artifactory-url: ${{ vars.ARTIFACTORY_CARGO_URL }} | |
| artifactory-username: ${{ secrets.ARTIFACTORY_CI_USERNAME }} | |
| artifactory-password: ${{ secrets.ARTIFACTORY_CI_TOKEN }} | |
| build-type: ${{ needs.detect.outputs.build_type }} | |
| publish-binaries: ${{ needs.detect.outputs.publish_binaries }} | |
| binaries-repo: ${{ needs.detect.outputs.binaries_repo }} | |
| github-token: ${{ steps.token.outputs.token }} | |
| # Container publishing (optional - enable in .hyperi-ci.yaml) | |
| container-enabled: ${{ needs.detect.outputs.container_enabled }} | |
| container-registry: ${{ needs.detect.outputs.container_registry }} | |
| container-dockerfile: ${{ needs.detect.outputs.container_dockerfile }} | |
| container-context: ${{ needs.detect.outputs.container_context }} | |
| container-platforms: ${{ needs.detect.outputs.container_platforms }} | |
| # Helm chart publishing (optional - enable in .hyperi-ci.yaml) | |
| helm-enabled: ${{ needs.detect.outputs.helm_enabled }} | |
| helm-chart-path: ${{ needs.detect.outputs.helm_chart_path }} | |
| helm-registry-url: ${{ needs.detect.outputs.helm_registry_url }} | |
| linear-api-key: ${{ secrets.LINEAR_API_KEY }} | |
| linear-prefixes: ${{ vars.LINEAR_PREFIXES || 'DFE' }} |