-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update release process with release-please (#816)
- Loading branch information
1 parent
36db986
commit 1b49d91
Showing
7 changed files
with
141 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"bump-minor-pre-major": true, | ||
"bump-patch-for-minor-pre-major": true, | ||
"include-component-in-tag": true, | ||
"release-type": "simple", | ||
"packages": { | ||
".": { | ||
"component": "foundry-zksync", | ||
"extra-files": [ | ||
{ | ||
"type": "generic", | ||
"path": "Cargo.toml" | ||
} | ||
] | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
".": "0.0.2" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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 | ||
|
||
# Run the workflow on push to the main branch and manually | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
# Prepare the release PR with changelog updates and create github releases | ||
# Do not publish to crates.io or upgrade dependencies | ||
release-please: | ||
uses: matter-labs/zksync-ci-common/.github/workflows/release-please.yaml@v1 | ||
secrets: | ||
slack_webhook: ${{ secrets.SLACK_WEBHOOK }} | ||
gh_token: ${{ secrets.GITHUB_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: false # Enable publishing to crates.io | ||
upgrade-dependencies: false # Upgrade workspace dependencies | ||
|
||
# Trigger workflow to generate artifacts | ||
release: | ||
if: ${{ needs.release-please.outputs.releases_created == 'true' }} | ||
needs: release-please | ||
uses: ./.github/workflows/release.yml | ||
with: | ||
tag: ${{ needs.release-please.outputs.tag_name }} | ||
secrets: inherit |
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
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 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Release Process | ||
|
||
This document outlines the automated release process for `foundry-zksync` project. | ||
The release process ensures that every change is systematically analyzed, documented, and packaged for distribution. | ||
|
||
## Release Process Overview | ||
|
||
1. **Triggering the Release Workflow** | ||
- Every merge to the `main` branch activates a special workflow. | ||
- This workflow uses the [`release-please` tool](https://github.com/googleapis/release-please) to analyze the commits. | ||
|
||
2. **Commit Analysis and Release Candidate Creation** | ||
- The `release-please` tool scans for new conventional commits that meet the criteria for triggering a release. | ||
- If qualifying commits are found, the tool automatically creates a **Release Pull Request (PR)**. This PR includes: | ||
- An updated changelog detailing the new changes. | ||
- Updated `Cargo.toml` and `Cargo.lock` files with the next release version. | ||
|
||
3. **Review and Approval** | ||
- The Release PR must be reviewed and approved by the designated Release Manager. | ||
- Once approved, the PR is merged when the release is planned. | ||
|
||
4. **Creating a New Release** | ||
- Upon merging the Release PR: | ||
- The workflow automatically creates a new GitHub tag and release corresponding to the new version. | ||
- The Release PR is marked as "released" and linked to the newly created release. | ||
- Merged PRs included in the release are also labeled with `released in version...`. | ||
|
||
5. **Generating and Publishing Artifacts** | ||
- The `release-please` workflow also triggers the `release.yaml` workflow. | ||
- This workflow generates binary artifacts for the release and attaches them to the GitHub release generated by `release-please`. | ||
|
||
6. **Release Completion** | ||
- With the binary artifacts added, the release is complete and available for distribution. | ||
|
||
## Release Versioning | ||
|
||
The `foundry-zksync` project follows [Semantic Versioning](https://semver.org/). | ||
|
||
Tags are created in the format `foundry-zksync-vX.Y.Z`. |