Skip to content

Commit

Permalink
Merge pull request #184 from 0xPolygonMiden/greenhat/i142-ci-release
Browse files Browse the repository at this point in the history
chore: setup release-plz on CI
  • Loading branch information
greenhat authored Jun 26, 2024
2 parents 2a1e66d + 606b852 commit e84a020
Show file tree
Hide file tree
Showing 29 changed files with 136 additions and 51 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Runs `release-plz release` only after the release PR is merged to the main branch
# see `release_always = false` in `release-plz.toml`
# Which publishes any unpublished crates.
# Does nothing if all crates are already published (i.e. have their versions on crates.io).
# Does not create/update release PRs.
# The crate version bumping and changelog generation is done manually via the `release-plz release_pr` CLI command.
# Which creates the PR with the proposed changes and when the PR is merged this action will publish the crates.
name: release-plz

on:
push:
branches:
- main

env:
CARGO_MAKE_TOOLCHAIN: nightly-2024-03-10

jobs:
release-plz:
name: release-plz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
override: true
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.CARGO_MAKE_TOOLCHAIN }}
- name: Run release-plz
uses: MarcoIeni/[email protected]
with:
# Only run the `release` command.
# The release PR is created manually via the `release-plz release_pr` CLI command.
# see https://release-plz.ieni.dev/docs/usage/release for more details
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contributing to Miden Compiler

TBD

## Release Process

The release process for the Miden Compiler is managed using the `release-plz` tool. The following steps outline the process for creating a new release:

1. Run `release-plz update` to update the crate versions and generate changelogs.
2. Create a release PR naming the branch with `release-plz-` suffix (its important to use this suffix to trigger the crate publishing on CI in step 4).
3. Review the changes in the release PR, commit edits if needed and merge it into the main branch.
4. The CI will automatically run `release-plz release` after the release PR is merged to publish the new versions to crates.io.
5. Set a git tag for the published crates to mark the release.

### Prerequisites

Install `release-plz` CLI tool following the instructions [here](https://release-plz.ieni.dev/docs/usage/installation)

### Release of the Miden Cargo Extension

Run the steps outlined above in the `Release Process` section in the repo root folder.

### Release of the Miden SDK

TBD
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ members = [
exclude = ["tests/rust-apps-wasm", "cargo-ext/tests/data"]

[workspace.package]
version = "0.1.0"
version = "0.0.0"
rust-version = "1.73"
authors = ["Miden Team"]
authors = ["Miden contributors"]
description = "An intermediate representation and compiler for Miden Assembly"
repository = "https://github.com/0xPolygonMiden/compiler"
homepage = "https://github.com/0xPolygonMiden/compiler"
Expand Down Expand Up @@ -71,7 +71,7 @@ miden-processor = { git = "https://github.com/0xPolygonMiden/miden-vm", rev = "d
miden-stdlib = { git = "https://github.com/0xPolygonMiden/miden-vm", rev = "ddf536cd7157053f0940d7be41998b2a6546b4c1" }
midenc-codegen-masm = { path = "codegen/masm" }
miden-diagnostics = "0.1"
midenc-hir= { path = "hir" }
midenc-hir = { path = "hir" }
midenc-hir-analysis = { path = "hir-analysis" }
midenc-hir-macros = { path = "hir-macros" }
midenc-hir-symbol = { path = "hir-symbol" }
Expand Down
3 changes: 2 additions & 1 deletion codegen/masm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "midenc-codegen-masm"
version.workspace = true
description = "Miden Assembly backend for the Miden compiler"
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions frontend-wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "midenc-frontend-wasm"
description = "Build MidenIR from Wasm"
version.workspace = true
description = "Wasm frontend for the Miden compiler"
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion hir-analysis/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "midenc-hir-analysis"
version.workspace = true
description = "Analysis passes and utilties for Miden HIR"
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion hir-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "midenc-hir-macros"
description = "Provides proc macro support for Miden IR"
version.workspace = true
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion hir-symbol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "midenc-hir-symbol"
version.workspace = true
description = "String interning for the Miden compiler"
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion hir-transform/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "midenc-hir-transform"
version.workspace = true
description = "Transformation passes and utilities for Miden HIR"
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion hir-type/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "midenc-hir-type"
version.workspace = true
description = "Type system and utilities for Miden HIR"
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion hir/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "midenc-hir"
version.workspace = true
description = "High-level Intermediate Representation for Miden Assembly"
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion midenc-compile/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "midenc-compile"
description = "The compiler frontend for Miden"
version.workspace = true
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion midenc-driver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "midenc-driver"
description = "The driver for midenc, the Miden compiler"
version.workspace = true
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion midenc-session/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "midenc-session"
version.workspace = true
description = "Session management for the Midenc compiler"
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion midenc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "midenc"
description = "The compiler frontend/executable for Miden"
version.workspace = true
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
7 changes: 7 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[workspace]
# Only publish when the release PR is merged
# https://release-plz.ieni.dev/docs/config#the-release_always-field
release_always = false
# Does not create a git tag
# https://release-plz.ieni.dev/docs/config#the-git_tag_enable-field
git_tag_enable = false
6 changes: 3 additions & 3 deletions sdk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ members = [

[workspace.package]

version = "0.1.0"
version = "0.0.0"
rust-version = "1.71"
authors = ["Miden Team"]
authors = ["Miden contributors"]
repository = "https://github.com/0xPolygonMiden/compiler"
homepage = "https://github.com/0xPolygonMiden/compiler"
documentation = "https://github.com/0xPolygonMiden/compiler"
Expand Down
2 changes: 1 addition & 1 deletion sdk/sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "miden-sdk"
description = "Miden SDK"
version.workspace = true
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion sdk/stdlib-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "miden-stdlib-sys"
description = "Low-level Rust bindings for the Miden standard library"
version.workspace = true
version = "0.0.0"
rust-version.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
Loading

0 comments on commit e84a020

Please sign in to comment.