diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aad9077..bccdf09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,6 @@ +# Copyright 2022-2023, axodotdev +# SPDX-License-Identifier: MIT or Apache-2.0 +# # CI that: # # * checks for a Git Tag that looks like a release @@ -51,20 +54,20 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v3 - - name: Install Rust - run: rustup update 1.67.1 --no-self-update && rustup default 1.67.1 + with: + submodules: recursive - 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.1.0/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!" @@ -73,7 +76,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 @@ -82,29 +85,33 @@ jobs: needs: create-release if: ${{ needs.create-release.outputs.has-releases == 'true' }} strategy: + fail-fast: false matrix: # For these target platforms include: - - os: ubuntu-20.04 - dist-args: --artifacts=global - 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 - - 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 - - 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 - - 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 + - os: "ubuntu-20.04" + dist-args: "--artifacts=global" + install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.1.0/cargo-dist-installer.sh | sh" + - os: "macos-11" + dist-args: "--artifacts=local --target=aarch64-apple-darwin" + install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.1.0/cargo-dist-installer.sh | sh" + - os: "macos-11" + dist-args: "--artifacts=local --target=x86_64-apple-darwin" + install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.1.0/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.1.0/cargo-dist-installer.ps1 | iex" + - 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.1.0/cargo-dist-installer.sh | sh" runs-on: ${{ matrix.os }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v3 - - name: Install Rust - run: rustup update 1.67.1 --no-self-update && rustup default 1.67.1 + with: + submodules: recursive - name: Install cargo-dist run: ${{ matrix.install-dist }} - name: Run cargo-dist @@ -119,7 +126,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) @@ -135,6 +142,8 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v3 + with: + submodules: recursive - name: mark release as non-draft run: | - gh release edit ${{ github.ref_name }} --draft=false \ No newline at end of file + gh release edit ${{ github.ref_name }} --draft=false diff --git a/CHANGELOG.md b/CHANGELOG.md index 904f9c6..31e88fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Version 0.4.6 (2023-08-28) + +* Upgrades cargo-dist config and rustc for release build. + # Version 0.4.5 (2023-08-28) * The new "platforms" module contains target triple constants and a function to map triples to human-readable display strings. diff --git a/Cargo.lock b/Cargo.lock index d20c592..f16330c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -123,7 +123,7 @@ dependencies = [ [[package]] name = "axoproject" -version = "0.4.5" +version = "0.4.6" dependencies = [ "axoasset", "axocli", @@ -1217,9 +1217,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.9" +version = "0.38.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfe0f2582b4931a45d1fa608f8a8722e8b3c7ac54dd6d5f3b3212791fedef49" +checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" dependencies = [ "bitflags 2.4.0", "errno", diff --git a/Cargo.toml b/Cargo.toml index d4849df..76f0384 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ exclude = ["tests/projects/"] [package] name = "axoproject" description = "project detection logic for various axo.dev applications" -version = "0.4.5" +version = "0.4.6" edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/axodotdev/axoproject" @@ -57,9 +57,7 @@ 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" -# The preferred Rust toolchain to use in CI (rustup toolchain syntax) -rust-toolchain-version = "1.67.1" +cargo-dist-version = "0.1.0" # CI backends to support (see 'cargo dist generate-ci') ci = ["github"] # The installers to generate for each app