-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8749ff9
commit f16f58b
Showing
4 changed files
with
32 additions
and
153 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,32 @@ | ||
name: Release-please | ||
|
||
# Give permissions to the release-please bot to open and update PRs | ||
# and commit to PRs the repository to update Cargo.lock | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
id-token: write | ||
attestations: write | ||
packages: write | ||
|
||
# Run the workflow on push to the main branch and manually | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: "always" | ||
CARGO_INCREMENTAL: "0" | ||
RUSTC_WRAPPER: "sccache" | ||
SCCACHE_GHA_ENABLED: "true" | ||
# Rust version to use. | ||
# Should be aligned with the version used in core to prevent regressions on publish. | ||
nightly: nightly-2024-08-01 | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: release-please | ||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
releases_created: ${{ steps.release.outputs.releases_created }} | ||
release_please_output_json: ${{ toJSON(steps.release.outputs) }} | ||
steps: | ||
- name: Run release-please | ||
id: release | ||
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3 | ||
with: | ||
token: ${{ secrets.RELEASE_TOKEN }} | ||
config-file: .github/release-please/config.json | ||
manifest-file: .github/release-please/manifest.json | ||
|
||
- name: Show outputs | ||
env: | ||
OUTPUTS: ${{ toJSON(steps.release.outputs) }} | ||
run: echo "$OUTPUTS" | ||
|
||
process-release: | ||
runs-on: [ubuntu-24.04-github-hosted-32core] | ||
needs: [release-please] | ||
if: ${{ needs.release-please.outputs.releases_created == 'true' }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | ||
|
||
- name: Install Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ env.nightly }} | ||
|
||
- name: Install sccache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Install cargo-workspaces | ||
run: cargo install cargo-workspaces | ||
|
||
- name: Build each package separately | ||
# Ignore the fuzzing crate which requires a wrapper to build | ||
run: cargo ws exec --ignore-private cargo build | ||
|
||
- name: Login to crates.io | ||
run: cargo login ${{ secrets.CRATES_IO_TOKEN }} | ||
|
||
- name: Publish | ||
run: cargo ws publish --publish-as-is --allow-dirty | ||
|
||
- name: Set owners for new packages | ||
# `cargo owner --add` fails if the package is already owned by the same entity, | ||
# so we have to check if the package is already owned by the organization. | ||
run: | | ||
ORG_OWNER=github:matter-labs:crates-io | ||
for PKG in $(cargo ws list); do | ||
cargo owner --list --quiet $PKG | grep $ORG_OWNER || cargo owner --add $ORG_OWNER $PKG | ||
done | ||
- name: Send Release Info | ||
uses: matter-labs/format-release-please-for-slack-action@69e6fe9e4ec531b7b5fb0d826f73c190db83cf42 # v2.1.0 | ||
with: | ||
release-please-output: ${{ needs.release-please.outputs.release_please_output_json }} | ||
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_RELEASES }} | ||
|
||
- name: Notify about failure | ||
if: failure() | ||
uses: matter-labs/format-release-please-for-slack-action@69e6fe9e4ec531b7b5fb0d826f73c190db83cf42 # v2.1.0 | ||
with: | ||
release-please-output: '{ "body": "⚠️ Failed to publish the release" }' | ||
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_RELEASES }} | ||
# Prepare the release PR with changelog updates and create github releases | ||
release-please: | ||
uses: matter-labs/zksync-ci-common/.github/workflows/release-please.yaml@v1 | ||
secrets: | ||
slack_webhook: ${{ secrets.SLACK_WEBHOOK_RELEASES }} | ||
gh_token: ${{ secrets.RELEASE_TOKEN }} | ||
cargo_registry_token: ${{ secrets.CRATES_IO_TOKEN }} | ||
with: | ||
config: '.github/release-please/config.json' # Specify the path to the configuration file | ||
manifest: '.github/release-please/manifest.json' # Specify the path to the manifest file | ||
update-cargo-lock: true # Update Cargo.lock file | ||
publish-to-crates-io: true # Enable publishing to crates.io |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ members = [ | |
resolver = "2" | ||
|
||
[workspace.package] | ||
version = "0.3.0" | ||
version = "0.3.0" # x-release-please-version | ||
edition = "2021" | ||
authors = ["The Matter Labs Team <[email protected]>"] | ||
homepage = "https://zksync.io/" | ||
|