Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release Checker

on:
# Change to pull_request_target for the workflow to function correctly on PRs from forks
pull_request:
paths:
- "**/Cargo.toml"
types: [ opened, synchronize, reopened, labeled, unlabeled ]
workflow_dispatch:

permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release-check:
uses: ipdxco/unified-github-workflows/.github/workflows/release-check.yml@v1.0
if: ${{ github.event_name == 'workflow_dispatch' || !github.event.pull_request.head.repo.fork }}
with:
sources: |
[
"fvm/Cargo.toml",
"sdk/Cargo.toml",
"shared/Cargo.toml"
]
separator: "@"
branches: '["release/v3"]'
cargo-publish:
needs: [release-check]
if: needs.release-check.outputs.json != '{}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install required packages
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: |
sudo apt-get update
sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
- name: Dry-run publish
run: |
# Use cargo publish --workspace --dry-run to verify the entire workspace at once.
# This correctly handles interdependent crates which a matrix-based approach misses.
cargo publish --workspace --dry-run
51 changes: 51 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Releaser

on:
push:
paths:
- "**/Cargo.toml"
workflow_dispatch:

permissions:
contents: write
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true

jobs:
releaser:
uses: ipdxco/unified-github-workflows/.github/workflows/releaser.yml@v1.0
with:
sources: |
[
"fvm/Cargo.toml",
"sdk/Cargo.toml",
"shared/Cargo.toml"
]
separator: "@"
branches: '["release/v3"]'
secrets:
UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }}

cargo-publish:
needs: [releaser]
if: needs.releaser.outputs.json != '{}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install required packages
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: |
sudo apt-get update
sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
- name: Publish to crates.io
run: |
# Use cargo publish --workspace to publish all changed crates in the workspace.
# This handles interdependent crates correctly and only publishes those with version bumps.
cargo publish --workspace
Loading