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

Fix mithril-common publication on crates.io #1372

Merged
merged 4 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 9 additions & 3 deletions .github/workflows/actions/publish-crate-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,27 @@ runs:
echo "should_deploy=false" >> $GITHUB_OUTPUT
fi
- name: Copy OpenAPI specs files
shell: bash
run: |
echo "Copy OpenAPI specs files"
cp openapi*.yaml ./${{ inputs.package}}
- name: Cargo publish dry run
shell: bash
run: |
echo "Cargo publish '${{ inputs.package }}' package (dry run)"
cargo publish -p ${{ inputs.package }} --dry-run --no-verify ${{ inputs.publish_args }}
cargo publish -p ${{ inputs.package }} --dry-run --no-verify --allow-dirty ${{ inputs.publish_args }}
- name: Cargo package list
shell: bash
run: |
echo "Cargo package list '${{ inputs.package }}' package"
cargo package -p ${{ inputs.package }} --list
cargo package -p ${{ inputs.package }} --list --allow-dirty
- name: Cargo publish
if: inputs.dry_run == 'false' && steps.check_version.outputs.should_deploy == 'true'
shell: bash
run: |
echo "Cargo publish '${{ inputs.package }}' package"
cargo publish -p ${{ inputs.package }} --token ${{ inputs.api_token }} --no-verify ${{ inputs.publish_args }}
cargo publish -p ${{ inputs.package }} --token ${{ inputs.api_token }} --no-verify --allow-dirty ${{ inputs.publish_args }}
2 changes: 1 addition & 1 deletion 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 mithril-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "mithril-common"
version = "0.2.136"
version = "0.2.138"
description = "Common types, interfaces, and utilities for Mithril nodes."
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
include = ["**/*.rs", "Cargo.toml", "README.md", ".gitignore"]
include = ["**/*.rs", "Cargo.toml", "README.md", ".gitignore", "openapi.yaml"]

[lib]
crate-type = ["lib", "cdylib", "staticlib"]
Expand Down
5 changes: 4 additions & 1 deletion mithril-common/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ fn read_version_from_open_api_spec_file(spec_file_path: PathBuf) -> OpenAPIVersi

fn list_all_open_api_spec_files() -> Vec<PathBuf> {
let mut open_api_spec_files = Vec::new();
for entry in glob("./openapi*.yaml").unwrap() {
open_api_spec_files.push(entry.unwrap())
}
for entry in glob("../openapi*.yaml").unwrap() {
open_api_spec_files.push(entry.unwrap())
}
Expand Down Expand Up @@ -51,7 +54,7 @@ fn main() {
/// Open API file name
pub type OpenAPIFileName = String;

/// Open PAI raw version
/// Open API raw version
pub type OpenAPIVersionRaw = String;

/// Build Open API versions mapping
Expand Down