Skip to content

Commit

Permalink
chore: update cargo-dist
Browse files Browse the repository at this point in the history
  • Loading branch information
k9withabone committed Jun 15, 2023
1 parent 278c4a1 commit 18140a3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update 1.68.2 --no-self-update && rustup default 1.68.2
run: rustup update 1.70.0 --no-self-update && rustup default 1.70.0
- name: Install cargo-dist
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.5/cargo-dist-v0.0.5-installer.sh | sh
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.sh | sh
- id: create-release
run: |
cargo dist manifest --tag=${{ github.ref_name }} --artifacts=all --no-local-paths --output-format=json > dist-manifest.json
echo "dist manifest ran successfully"
cargo dist plan --tag=${{ github.ref_name }} --output-format=json > dist-manifest.json
echo "dist plan ran successfully"
cat dist-manifest.json
# Create the Github Release™ based on what cargo-dist thinks it should be
ANNOUNCEMENT_TITLE=$(cat dist-manifest.json | jq --raw-output ".announcement_title")
IS_PRERELEASE=$(cat dist-manifest.json | jq --raw-output ".announcement_is_prerelease")
cat dist-manifest.json | jq --raw-output ".announcement_github_body" > new_dist_announcement.md
ANNOUNCEMENT_TITLE=$(jq --raw-output ".announcement_title" dist-manifest.json)
IS_PRERELEASE=$(jq --raw-output ".announcement_is_prerelease" dist-manifest.json)
jq --raw-output ".announcement_github_body" dist-manifest.json > new_dist_announcement.md
gh release create ${{ github.ref_name }} --draft --prerelease="$IS_PRERELEASE" --title="$ANNOUNCEMENT_TITLE" --notes-file=new_dist_announcement.md
echo "created announcement!"
Expand All @@ -73,7 +73,7 @@ jobs:
echo "uploaded manifest!"
# Disable all the upload-artifacts tasks if we have no actual releases
HAS_RELEASES=$(cat dist-manifest.json | jq --raw-output ".releases != null")
HAS_RELEASES=$(jq --raw-output ".releases != null" dist-manifest.json)
echo "has-releases=$HAS_RELEASES" >> "$GITHUB_OUTPUT"
# Build and packages all the things
Expand All @@ -87,21 +87,21 @@ jobs:
include:
- os: macos-11
dist-args: --artifacts=local --target=aarch64-apple-darwin --target=x86_64-apple-darwin
install-dist: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.5/cargo-dist-v0.0.5-installer.sh | sh
install-dist: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.sh | sh
- os: ubuntu-20.04
dist-args: --artifacts=local --target=x86_64-unknown-linux-gnu
install-dist: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.5/cargo-dist-v0.0.5-installer.sh | sh
install-dist: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.sh | sh
- os: windows-2019
dist-args: --artifacts=local --target=x86_64-pc-windows-msvc
install-dist: irm https://github.com/axodotdev/cargo-dist/releases/download/v0.0.5/cargo-dist-v0.0.5-installer.ps1 | iex
install-dist: irm https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.ps1 | iex

runs-on: ${{ matrix.os }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update 1.68.2 --no-self-update && rustup default 1.68.2
run: rustup update 1.70.0 --no-self-update && rustup default 1.70.0
- name: Install cargo-dist
run: ${{ matrix.install-dist }}
- name: Run cargo-dist
Expand All @@ -116,7 +116,7 @@ jobs:
cat dist-manifest.json
# Parse out what we just built and upload it to the Github Release™
cat dist-manifest.json | jq --raw-output ".artifacts[]?.path | select( . != null )" > uploads.txt
jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json > uploads.txt
echo "uploading..."
cat uploads.txt
gh release upload ${{ github.ref_name }} $(cat uploads.txt)
Expand All @@ -134,4 +134,4 @@ jobs:
- uses: actions/checkout@v3
- name: mark release as non-draft
run: |
gh release edit ${{ github.ref_name }} --draft=false
gh release edit ${{ github.ref_name }} --draft=false
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.

17 changes: 7 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "podlet"
version = "0.2.0-alpha.2"
version = "0.2.0"
authors = ["Paul Nettleton <[email protected]>"]
edition = "2021"
description = "Podlet generates podman quadlet (systemd-like) files from a podman command."
Expand All @@ -17,7 +17,7 @@ docker-compose-types = "0.5.1"
duration-str = { version = "0.5", default-features = false }
indexmap = { version = "1.9", features = ["std"] }
ipnet = "2.7"
k8s-openapi = { version = "0.18.0", features = ["v1_26"], default-features = false }
k8s-openapi = { version = "0.18", features = ["v1_26"], default-features = false }
serde_yaml = "0.9.21"
shlex = "1.1"
thiserror = "1.0.40"
Expand All @@ -35,15 +35,12 @@ lto = "thin"
# Config for 'cargo dist'
[workspace.metadata.dist]
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.0.5"
cargo-dist-version = "0.0.7"
# The preferred Rust toolchain to use in CI (rustup toolchain syntax)
rust-toolchain-version = "1.68.2"
rust-toolchain-version = "1.70.0"
# CI backends to support (see 'cargo dist generate-ci')
ci = ["github"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"aarch64-apple-darwin",
]
targets = ["x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-pc-windows-msvc", "aarch64-apple-darwin"]
# The installers to generate for each app
installers = []

0 comments on commit 18140a3

Please sign in to comment.