Skip to content

Commit 3d936cd

Browse files
authored
Revert "chore: revive and improve release automation (#2266)" (#2275)
This reverts commit 2af1f30.
1 parent 2af1f30 commit 3d936cd

3 files changed

Lines changed: 46 additions & 133 deletions

File tree

.github/workflows/release-check.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/releaser.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

RELEASE.md

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The FVM is a workspace of crates which have different release schedules:
1414
> When releasing a new version of the FVM, make sure to check if any backports are needed and do them in separate PRs targeting the appropriate branches. Afterwards, make sure to create a new release for the backported changes.
1515
> Note that the v2 and v3 tracks no longer contain the `fvm_integration_tests` crate so there is no need to backport and release it.
1616
17-
The primary crates are `fvm`, `fvm_shared`, `fvm_sdk`, and the integration testing framework `fvm_integration_tests`. These are the crates that have [`version.workspace = true`](https://github.com/search?q=repo%3Afilecoin-project%2Fref-fvm%20version.workspace%20%3D%20true&type=code).
17+
The primary crates are `fvm`, `fvm_shared`, `fvm_sdk`, and the integration testing framework `fvm_integration_tests`. These are the crates that have [`version.workspace = true`](https://github.com/search?q=repo%3Afilecoin-project%2Fref-fvm%20version.workspace%20%3D%20true&type=code).
1818

1919
## Versioning
2020
Versioning of the [primary crates](#primary-crates) is not strictly semver compatible:
@@ -33,6 +33,9 @@ To propose a new release, open a pull request with the following changes:
3333
2. Update the version of the coupled workspace dependencies in `Cargo.toml` to match the new version
3434
(leaving semver range specifier `~` intact):
3535
1. `workspace.dependencies→fvm→version`
36+
2. `wokspace.dependencies→fvm_shared→version`
37+
3. `wokspace.dependencies→fvm_sdk→version`
38+
1. `workspace.dependencies→fvm→version`
3639
2. `workspace.dependencies→fvm_shared→version`
3740
3. `workspace.dependencies→fvm_sdk→version`
3841
4. `workspace.dependencies→fvm_integration_tests→version`
@@ -44,11 +47,6 @@ To propose a new release, open a pull request with the following changes:
4447

4548
See [PR #2002](https://github.com/filecoin-project/ref-fvm/pull/2002) for an example.
4649

47-
When a release PR is opened or updated, the **Release Checker** GitHub Action will:
48-
* Verify that the version bump is correct.
49-
* Perform a workspace-wide dry-run publish (`cargo publish --workspace --dry-run`) to ensure all crates are in a valid state for release.
50-
* Create a draft GitHub Release and comment on the PR with a summary.
51-
5250
## Preparing Other/Non-Primary Crates
5351

5452
To propose a release of a crate other than `fvm`, `fvm_shared`, `fvm_sdk`, or
@@ -60,28 +58,59 @@ To propose a release of a crate other than `fvm`, `fvm_shared`, `fvm_sdk`, or
6058
3. Make sure the `CHANGELOG.md` files are all up-to-date (look through `git log -- path/to/crate`),
6159
set the release date & version, and add a new "Unreleased" section.
6260

63-
The **Release Checker** will also handle these crates independently based on the paths modified in the PR.
64-
6561
## Review and Release
6662

6763
Once the release is prepared, it'll go through a review:
6864

6965
1. Make sure that we're _ready_ to release. E.g., make sure downstream can consume the release.
7066
2. Make sure that we're correctly following semver.
7167
3. Make sure that we're not missing anything in the changelogs.
72-
4. Verify that the **Release Checker** action has passed, including the "Dry-run publish" step.
7368

7469
Finally, an [FVM "owner"](https://github.com/orgs/filecoin-project/teams/fvm-crate-owners/members) will:
7570

7671
1. Merge the release PR to master.
77-
2. The **Releaser** GitHub Action will automatically:
78-
* Create git tags for each released crate (`crate_name@vX.Y.Z`).
79-
* Publish the draft GitHub Release(s).
80-
* Publish the crates to [crates.io](https://crates.io) using `cargo publish --workspace --no-default-features`.
81-
- Note: This repository uses **trusted publishing** via OIDC. No `CARGO_REGISTRY_TOKEN` secret is required, but the repository must be configured as a trusted publisher on crates.io.
82-
83-
3. Verify the releases on crates.io:
72+
2. For each released crate, create a git tag: `crate_name@crate_version`.
73+
3. Run `cargo publish` for each released crate (in dependency order).
74+
75+
Example steps for an FVM "owner" to release `MINOR` and `PATCH` crates:
76+
77+
1. Merge the `PATCH` release PR to master (e.g., [PR #2030](https://github.com/filecoin-project/ref-fvm/pull/2030)).
78+
2. Publish all [primary crates](#primary-crates) . For each crate (fvm, fvm_shared, fvm_sdk, fvm_integration_tests):
79+
80+
```bash
81+
# Declare an associative array for crate_name → crate_directory
82+
declare -A crates
83+
crates["fvm"]="fvm"
84+
crates["fvm_shared"]="shared"
85+
crates["fvm_sdk"]="fvm_sdk"
86+
crates["fvm_integration_tests"]="testing/integration"
87+
88+
workspace_package_version = `tomlq '.workspace.package.version' Cargo.toml`
89+
90+
for crate_name in "${!crates[@]}"; do
91+
crate_directory = ${crates[$key]}
92+
pushd $crate_directory
93+
cargo publish
94+
workspace_package_version=`tomlq '.workspace.package.version' Cargo.toml`
95+
96+
for crate_name in "${!my_map[@]}"; do
97+
crate_directory=${crates[$key]}
98+
pushd $crate_directory
99+
cargo publish
100+
git_tag="$crate_name@v$workspace_package_version"
101+
git tag $git_tag
102+
popd
103+
done
104+
```
105+
106+
3. After creating all tags, push them:
107+
108+
```shell
109+
git push --tags
110+
```
111+
112+
4. Verify the releases on crates.io:
84113
https://crates.io/crates/fvm/versions
85114
https://crates.io/crates/fvm_shared/versions
86115
https://crates.io/crates/fvm_sdk/versions
87-
https://crates.io/crates/fvm_integration_tests/versions
116+
https://crates.io/crates/fvm_integration_tests/versions

0 commit comments

Comments
 (0)