From 37d6294da403285e57f07053e556fba766b002e3 Mon Sep 17 00:00:00 2001 From: Nicolas BACQUEY Date: Wed, 23 Oct 2024 18:23:44 +0200 Subject: [PATCH] release v0.5.1 --- .github/workflows/release.yml | 79 ++++++++++++++++++++--------------- CHANGELOG.md | 6 +-- Cargo.lock | 16 +++---- Cargo.toml | 12 +++--- 4 files changed, 64 insertions(+), 49 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fac8039..a00892e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,8 @@ # title/body based on your changelogs. name: Release - permissions: - contents: write + "contents": "write" # This task will run whenever you push a git tag that looks like a version # like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc. @@ -38,15 +37,15 @@ permissions: # If there's a prerelease-style suffix to the version, then the release(s) # will be marked as a prerelease. on: + pull_request: push: tags: - '**[0-9]+.[0-9]+.[0-9]+*' - pull_request: jobs: # Run 'cargo dist plan' (or host) to determine what tasks we need to do plan: - runs-on: ubuntu-latest + runs-on: "ubuntu-20.04" outputs: val: ${{ steps.plan.outputs.manifest }} tag: ${{ !github.event.pull_request && github.ref_name || '' }} @@ -62,7 +61,12 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.2/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.19.1/cargo-dist-installer.sh | sh" + - name: Cache cargo-dist + uses: actions/upload-artifact@v4 + with: + name: cargo-dist-cache + path: ~/.cargo/bin/cargo-dist # sure would be cool if github gave us proper conditionals... # so here's a doubly-nested ternary-via-truthiness to try to provide the best possible # functionality based on whether this is a pull_request, and whether it's from a fork. @@ -105,12 +109,12 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json steps: + - name: enable windows longpaths + run: | + git config --global core.longpaths true - uses: actions/checkout@v4 with: submodules: recursive - - uses: swatinem/rust-cache@v2 - with: - key: ${{ join(matrix.targets, '-') }} - name: Install cargo-dist run: ${{ matrix.install_dist }} # Get the dist-manifest @@ -162,9 +166,12 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - name: Install cargo-dist - shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.2/cargo-dist-installer.sh | sh" + - name: Install cached cargo-dist + uses: actions/download-artifact@v4 + with: + name: cargo-dist-cache + path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/cargo-dist # Get all the local artifacts for the global tasks to use (for e.g. checksums) - name: Fetch local artifacts uses: actions/download-artifact@v4 @@ -208,8 +215,12 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - name: Install cargo-dist - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.2/cargo-dist-installer.sh | sh" + - name: Install cached cargo-dist + uses: actions/download-artifact@v4 + with: + name: cargo-dist-cache + path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/cargo-dist # Fetch artifacts from scratch-storage - name: Fetch artifacts uses: actions/download-artifact@v4 @@ -217,7 +228,6 @@ jobs: pattern: artifacts-* path: target/distrib/ merge-multiple: true - # This is a harmless no-op for GitHub Releases, hosting for that happens in "announce" - id: host shell: bash run: | @@ -231,8 +241,29 @@ jobs: # Overwrite the previous copy name: artifacts-dist-manifest path: dist-manifest.json + # Create a GitHub Release while uploading all files to it + - name: "Download GitHub Artifacts" + uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: artifacts + merge-multiple: true + - name: Cleanup + run: | + # Remove the granular manifests + rm -f artifacts/*-dist-manifest.json + - name: Create GitHub Release + env: + PRERELEASE_FLAG: "${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}" + ANNOUNCEMENT_TITLE: "${{ fromJson(steps.host.outputs.manifest).announcement_title }}" + ANNOUNCEMENT_BODY: "${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}" + RELEASE_COMMIT: "${{ github.sha }}" + run: | + # Write and read notes from a file to avoid quoting breaking things + echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt + + gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/* - # Create a GitHub Release while uploading all files to it announce: needs: - plan @@ -248,21 +279,3 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - name: "Download GitHub Artifacts" - uses: actions/download-artifact@v4 - with: - pattern: artifacts-* - path: artifacts - merge-multiple: true - - name: Cleanup - run: | - # Remove the granular manifests - rm -f artifacts/*-dist-manifest.json - - name: Create GitHub Release - uses: ncipollo/release-action@v1 - with: - tag: ${{ needs.plan.outputs.tag }} - name: ${{ fromJson(needs.host.outputs.val).announcement_title }} - body: ${{ fromJson(needs.host.outputs.val).announcement_github_body }} - prerelease: ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease }} - artifacts: "artifacts/*" diff --git a/CHANGELOG.md b/CHANGELOG.md index 46f3ced1..39c83a9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,11 +42,11 @@ This name should be decided amongst the team before the release. ## Unreleased -[Full list of changes](https://github.com/tweag/topiary/compare/v0.5.0...HEAD) +[Full list of changes](https://github.com/tweag/topiary/compare/v0.5.1...HEAD) -## v0.5.0 - Fragrant Frangipani - 2024-10-22 +## v0.5.1 - Fragrant Frangipani - 2024-10-22 -[Full list of changes](https://github.com/tweag/topiary/compare/v0.4.0...v0.5.0) +[Full list of changes](https://github.com/tweag/topiary/compare/v0.4.0...v0.5.1) ### Added - [#705](https://github.com/tweag/topiary/pull/705) Added support for Nickel 1.7 extended pattern formatting diff --git a/Cargo.lock b/Cargo.lock index f8cdc216..456917a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -343,7 +343,7 @@ checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "client-app" -version = "0.5.0" +version = "0.5.1" dependencies = [ "tokio", "topiary-config", @@ -1936,7 +1936,7 @@ dependencies = [ [[package]] name = "topiary-cli" -version = "0.5.0" +version = "0.5.1" dependencies = [ "assert_cmd", "async-scoped", @@ -1959,7 +1959,7 @@ dependencies = [ [[package]] name = "topiary-config" -version = "0.5.0" +version = "0.5.1" dependencies = [ "cc", "clap", @@ -1979,7 +1979,7 @@ dependencies = [ [[package]] name = "topiary-core" -version = "0.5.0" +version = "0.5.1" dependencies = [ "criterion", "env_logger 0.10.2", @@ -2001,7 +2001,7 @@ dependencies = [ [[package]] name = "topiary-playground" -version = "0.5.0" +version = "0.5.1" dependencies = [ "itertools 0.11.0", "topiary-config", @@ -2013,11 +2013,11 @@ dependencies = [ [[package]] name = "topiary-queries" -version = "0.5.0" +version = "0.5.1" [[package]] name = "topiary-tree-sitter-facade" -version = "0.5.0" +version = "0.5.1" dependencies = [ "js-sys", "topiary-web-tree-sitter-sys", @@ -2030,7 +2030,7 @@ dependencies = [ [[package]] name = "topiary-web-tree-sitter-sys" -version = "0.5.0" +version = "0.5.1" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index 6a19e13a..71086806 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.5.0" +version = "0.5.1" edition = "2021" authors = ["Tweag"] homepage = "https://topiary.tweag.io" @@ -34,9 +34,9 @@ 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.13.2" +cargo-dist-version = "0.19.1" # CI backends to support -ci = ["github"] +ci = "github" # The installers to generate for each app installers = ["shell"] # Target platforms to build apps for (Rust target-triple syntax) @@ -45,6 +45,8 @@ targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux- pr-run-mode = "plan" # Whether to install an updater program install-updater = false +# Path that installers should place binaries in +install-path = "CARGO_HOME" [workspace.dependencies] assert_cmd = "2.0" @@ -89,8 +91,8 @@ wasm-bindgen-futures = "0.4" wasm-bindgen-test = "0.3" web-sys = "0.3" -topiary-web-tree-sitter-sys = { version = "0.5.0", path = "./topiary-web-tree-sitter-sys" } -topiary-tree-sitter-facade = { version = "0.5.0", path = "./topiary-tree-sitter-facade" } +topiary-web-tree-sitter-sys = { version = "0.5.1", path = "./topiary-web-tree-sitter-sys" } +topiary-tree-sitter-facade = { version = "0.5.1", path = "./topiary-tree-sitter-facade" } # tree-sitter-json's dependency on Tree-sitter is looser than ours, so # we have to pin its version to maintain API compatibility