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

test release merge #44

Merged
merged 5 commits into from
Nov 11, 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
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This workflow runs when commits are pushed to main or a branch starting with
# "version-". It checks if any packages require a new release, and if so,
# creates the crates.io release and git tag.
name: Release
on:
push:
branches:
- main
- version-*
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- cargo xtask auto-release
194 changes: 194 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ edition.workspace = true

[dependencies]
anyhow = "1.0.51"
cargo_metadata = "0.18.1"
clap = { version = "4.4.0", default-features = false, features = ["derive", "help", "usage", "std"] }
crates-index = "2.3.0"
fatfs = { version = "0.3.6", default-features = false, features = ["alloc", "std"] }
fs-err = "2.6.0"
heck = "0.4.0"
Expand All @@ -24,5 +26,5 @@ sha2 = "0.10.6"
syn = { version = "2.0.0", features = ["full"] }
tar = "0.4.38"
tempfile = "3.6.0"
ureq = { version = "2.8.0", features = ["http-interop"] }
walkdir = "2.4.0"
ureq = "2.8.0"
11 changes: 6 additions & 5 deletions xtask/src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ pub enum Package {
}

impl Package {
fn as_str(self) -> &'static str {
/// Get package name.
pub fn name(self) -> &'static str {
match self {
Self::Uefi => "uefi",
Self::UefiApp => "uefi_app",
Expand All @@ -28,12 +29,12 @@ impl Package {
}
}

/// All published packages.
/// All published packages, in the order that publishing should occur.
pub fn published() -> Vec<Package> {
vec![
Self::Uefi,
Self::UefiMacros,
Self::UefiRaw,
Self::UefiMacros,
Self::Uefi,
Self::UefiServices,
]
}
Expand Down Expand Up @@ -304,7 +305,7 @@ impl Cargo {
bail!("packages cannot be empty");
}
for package in &self.packages {
cmd.args(["--package", package.as_str()]);
cmd.args(["--package", package.name()]);
}

if !self.features.is_empty() {
Expand Down
2 changes: 2 additions & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ mod opt;
mod pipe;
mod platform;
mod qemu;
mod release;
mod tpm;
mod util;

Expand Down Expand Up @@ -314,5 +315,6 @@ fn main() -> Result<()> {
Action::Run(qemu_opt) => run_vm_tests(qemu_opt),
Action::Test(test_opt) => run_host_tests(test_opt),
Action::Fmt(fmt_opt) => run_fmt_project(fmt_opt),
Action::AutoRelease(_) => release::auto_release(),
}
}
Loading
Loading