Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use install-action to speed up installation of cargo tools #146

Merged
merged 4 commits into from
May 31, 2024
Merged
Changes from 1 commit
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
22 changes: 8 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ inputs:
description: "Config file location. If not present, the default 'release-plz.toml' is used."
required: false
manifest_path:
description: "Path to the Cargo.toml of the project you want to update. If not provided, release-plz will use the Cargo.toml of the
marcoieni marked this conversation as resolved.
Show resolved Hide resolved
root directory. Both Cargo workspaces and single packages are supported."
description:
"Path to the Cargo.toml of the project you want to update. If not provided, release-plz will use the Cargo.toml of the
root directory. Both Cargo workspaces and single packages are supported."
required: false
project_manifest:
description: "Deprecated. Use `manifest_path` instead."
required: false
version:
# TODO fix this
description: "Release-plz version to use. It must be an existing git tag name. For example `release-plz-v0.2.45`. (Default: `latest`)."
default: "release-plz-v0.3.70"
default: "0.3.70"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

So this is already a bit weird. You're making a release tool, for releasing crate versions, then publishing that tool to crates.io, but then installing it from your git repo via a specific tag version...

I suppose this makes sense if you're wanting to test out new versions of the tool in an action against a not yet released version of release-plz. I'm not sure if binstall supports some sort of git-tag version specifier.

I suspect this might break some small amount of workflows that specify this, but maybe the logic below can detect this and chop out the release-plz-v prefix somehow?

Copy link
Member

Choose a reason for hiding this comment

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

but then installing it from your git repo via a specific tag version

yes, this is because I was using an action that wasn't integrated with crates.io.

I suspect this might break some small amount of workflows

I'm not aware of any. This new approach should work well :)

For testing, typically I use cargo install because I don't tag "dev" versions in release-plz repo

Copy link
Member

Choose a reason for hiding this comment

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

I suspect this might break some small amount of workflows that specify this,

Now that I think about it. Yes, I think I broke some people GitHub actions. This should have been a 0.6.0 D:

required: false
token:
description: "Token used to publish to the cargo registry"
Expand Down Expand Up @@ -49,18 +51,10 @@ branding:
runs:
using: "composite"
steps:
- name: Install cargo-semver-checks
uses: jaxxstorm/action-install-[email protected]
- name: Install deps
uses: taiki-e/install-action@v2
with:
repo: obi1kenobi/cargo-semver-checks
tag: v0.31.0
cache: enable
- name: Install release-plz
uses: jaxxstorm/[email protected]
with:
repo: MarcoIeni/release-plz
tag: ${{ inputs.version }}
cache: enable
tool: [email protected], release-plz@${{ inputs.version }}
- name: Configure git user from GitHub token
uses: MarcoIeni/[email protected]
- name: Run release-plz
Expand Down