diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5018528f6..f2759582f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,7 +58,7 @@ jobs: with: submodules: recursive - name: Install cargo-dist - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.3.0/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.4.0/cargo-dist-installer.sh | sh" - id: plan run: | cargo dist plan ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }} --output-format=json > dist-manifest.json @@ -92,6 +92,7 @@ jobs: runs-on: ${{ matrix.runner }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json steps: - uses: actions/checkout@v4 with: @@ -99,26 +100,34 @@ jobs: - uses: swatinem/rust-cache@v2 - name: Install cargo-dist run: ${{ matrix.install_dist }} + - name: Install dependencies + run: | + ${{ matrix.packages_install }} + - name: Build artifacts + run: | + # Actually do builds and make zips and whatnot + cargo dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json + echo "cargo dist ran successfully" - id: cargo-dist + name: Post-build # We force bash here just because github makes it really hard to get values up # to "real" actions without writing to env-vars, and writing to env-vars has - # inconsistent syntax between shell and powershell. cargo-dist and jq work fine - # in powershell. + # inconsistent syntax between shell and powershell. shell: bash run: | - # Actually do builds and make zips and whatnot - cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json - echo "cargo dist ran successfully" - # Parse out what we just built and upload it to the Github Release™ echo "paths<> "$GITHUB_OUTPUT" jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT" + + cp dist-manifest.json "$BUILD_MANIFEST_NAME" - name: "Upload artifacts" uses: actions/upload-artifact@v3 with: name: artifacts - path: ${{ steps.cargo-dist.outputs.paths }} + path: | + ${{ steps.cargo-dist.outputs.paths }} + ${{ env.BUILD_MANIFEST_NAME }} should-publish: needs: @@ -130,7 +139,7 @@ jobs: - name: print tag run: echo "ok we're publishing!" - # Create a Github Release with all the results once everything is done, + # Create a Github Release with all the results once everything is done publish-release: needs: [plan, should-publish] runs-on: ubuntu-latest @@ -145,6 +154,10 @@ jobs: with: name: artifacts path: artifacts + - name: Cleanup + run: | + # Remove the granular manifests + rm artifacts/*-dist-manifest.json - name: Create Release uses: ncipollo/release-action@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c819962e..4fe39ce6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ - [Rust](https://github.com/moonrepo/rust-plugin/blob/master/CHANGELOG.md) - [Schema](https://github.com/moonrepo/schema-plugin/blob/master/CHANGELOG.md) +## Unreleased + +#### 🚀 Updates + +- Added Linux x64 musl support (`x86_64-unknown-linux-musl`). + ## 0.20.4 #### 🐞 Fixes diff --git a/Cargo.toml b/Cargo.toml index 156d6dc93..1b923f638 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ tracing = "0.1.40" # Config for 'cargo dist' [workspace.metadata.dist] # The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax) -cargo-dist-version = "0.3.0" +cargo-dist-version = "0.4.0" # CI backends to support ci = ["github"] # Target platforms to build apps for (Rust target-triple syntax) @@ -51,6 +51,7 @@ targets = [ "x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-apple-darwin", + "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc", ] # The installers to generate for each app @@ -59,6 +60,7 @@ installers = [] install-path = "~/.proto/bin" # Publish jobs to run in CI pr-run-mode = "plan" +# Skip checking whether the specified configuration files are up to date allow-dirty = ["ci"] [profile.dist]