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: 49 additions & 2 deletions .github/workflows/workspace-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:

permissions:
contents: read
id-token: write # Required for OIDC token exchange

jobs:
publish:
if: ${{ github.repository_owner == '0xMiden' }}
runs-on: ubuntu-latest
environment: release # Optional: for enhanced security
environment: release # Optional: for enhanced security
permissions:
contents: read
id-token: write # Required for OIDC token exchange

steps:
- name: Checkout repository
Expand All @@ -34,3 +36,48 @@ jobs:
release-branch: ${{ github.event.release.target_commitish }}
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

# Upload the pre-compiled artifacts (miden-protocol.masp) on the
# GitHub release page.
# Used by midenup to speed up installs.
upload-artifacts:
name: upload pre-built miden-protocol library artifacts
if: ${{ github.repository_owner == '0xMiden' }}
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: ${{ github.event.release.tag_name }}
persist-credentials: false
- uses: ./.github/actions/cleanup-runner
- name: Install Rust
run: |
rustup update --no-self-update
rustc --version
- name: Build packages
run: |
cargo build --release --locked -p miden-protocol -p miden-standards
- name: Prepare artifacts
run: |
set -euo pipefail
cp "$(find target/release/build -path '*/out/assets/miden-protocol.masp')" protocol.masp

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned this could pick up previous build artifacts from the cache. Why not have the build script of the protocol/standards crates write the package output to $CARGO_MANIFEST_DIR/../target/$PROFILE/<package>.masp (you may need to adjust the the number of ../ segments based on the folder hierarchy of each crate).

Then you will always know that after building those crates, the .masp files under target/$PROFILE/ will be the exact ones you requested

cp "$(find target/release/build -path '*/out/assets/miden-standards.masp')" standards.masp
- name: Attest packages
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
with:
subject-path: |
protocol.masp
standards.masp
- name: Upload packages
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
gh release upload ${RELEASE_TAG} protocol.masp standards.masp
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
- Simplified the `ownable2step` ownership transitions ([#3170](https://github.com/0xMiden/protocol/pull/3170)).
- Fixed `note_script_allowlist::assert_all_input_notes_allowed` and `tx_script_allowlist::assert_tx_script_allowed` to read the allowlist from the transaction's initial storage state via `active_account::get_initial_map_item` ([#3182](https://github.com/0xMiden/protocol/pull/3182)).

### Enhancements

- Added a CI release job that uploads the pre-built `protocol.masp` and `standards.masp` packages to the GitHub release page to aid `midenup`'s installation speed ([#2859](https://github.com/0xMiden/protocol/pull/2859)).

## v0.15.2 (2026-06-05)

### Changes
Expand Down
Loading