Skip to content

Commit

Permalink
Merge pull request input-output-hk#1372 from input-output-hk/jpraynau…
Browse files Browse the repository at this point in the history
…d/fix-build-script-mithril-common-crate

Fix `mithril-common` publication on crates.io
  • Loading branch information
jpraynaud authored Nov 28, 2023
2 parents 35864ed + 64e0806 commit a4842ae
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
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

0 comments on commit a4842ae

Please sign in to comment.