Skip to content

Commit 37d6294

Browse files
committed
release v0.5.1
1 parent 92aa157 commit 37d6294

File tree

4 files changed

+64
-49
lines changed

4 files changed

+64
-49
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
# title/body based on your changelogs.
1313

1414
name: Release
15-
1615
permissions:
17-
contents: write
16+
"contents": "write"
1817

1918
# This task will run whenever you push a git tag that looks like a version
2019
# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
@@ -38,15 +37,15 @@ permissions:
3837
# If there's a prerelease-style suffix to the version, then the release(s)
3938
# will be marked as a prerelease.
4039
on:
40+
pull_request:
4141
push:
4242
tags:
4343
- '**[0-9]+.[0-9]+.[0-9]+*'
44-
pull_request:
4544

4645
jobs:
4746
# Run 'cargo dist plan' (or host) to determine what tasks we need to do
4847
plan:
49-
runs-on: ubuntu-latest
48+
runs-on: "ubuntu-20.04"
5049
outputs:
5150
val: ${{ steps.plan.outputs.manifest }}
5251
tag: ${{ !github.event.pull_request && github.ref_name || '' }}
@@ -62,7 +61,12 @@ jobs:
6261
# we specify bash to get pipefail; it guards against the `curl` command
6362
# failing. otherwise `sh` won't catch that `curl` returned non-0
6463
shell: bash
65-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.2/cargo-dist-installer.sh | sh"
64+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.19.1/cargo-dist-installer.sh | sh"
65+
- name: Cache cargo-dist
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: cargo-dist-cache
69+
path: ~/.cargo/bin/cargo-dist
6670
# sure would be cool if github gave us proper conditionals...
6771
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
6872
# functionality based on whether this is a pull_request, and whether it's from a fork.
@@ -105,12 +109,12 @@ jobs:
105109
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106110
BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
107111
steps:
112+
- name: enable windows longpaths
113+
run: |
114+
git config --global core.longpaths true
108115
- uses: actions/checkout@v4
109116
with:
110117
submodules: recursive
111-
- uses: swatinem/rust-cache@v2
112-
with:
113-
key: ${{ join(matrix.targets, '-') }}
114118
- name: Install cargo-dist
115119
run: ${{ matrix.install_dist }}
116120
# Get the dist-manifest
@@ -162,9 +166,12 @@ jobs:
162166
- uses: actions/checkout@v4
163167
with:
164168
submodules: recursive
165-
- name: Install cargo-dist
166-
shell: bash
167-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.2/cargo-dist-installer.sh | sh"
169+
- name: Install cached cargo-dist
170+
uses: actions/download-artifact@v4
171+
with:
172+
name: cargo-dist-cache
173+
path: ~/.cargo/bin/
174+
- run: chmod +x ~/.cargo/bin/cargo-dist
168175
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
169176
- name: Fetch local artifacts
170177
uses: actions/download-artifact@v4
@@ -208,16 +215,19 @@ jobs:
208215
- uses: actions/checkout@v4
209216
with:
210217
submodules: recursive
211-
- name: Install cargo-dist
212-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.2/cargo-dist-installer.sh | sh"
218+
- name: Install cached cargo-dist
219+
uses: actions/download-artifact@v4
220+
with:
221+
name: cargo-dist-cache
222+
path: ~/.cargo/bin/
223+
- run: chmod +x ~/.cargo/bin/cargo-dist
213224
# Fetch artifacts from scratch-storage
214225
- name: Fetch artifacts
215226
uses: actions/download-artifact@v4
216227
with:
217228
pattern: artifacts-*
218229
path: target/distrib/
219230
merge-multiple: true
220-
# This is a harmless no-op for GitHub Releases, hosting for that happens in "announce"
221231
- id: host
222232
shell: bash
223233
run: |
@@ -231,8 +241,29 @@ jobs:
231241
# Overwrite the previous copy
232242
name: artifacts-dist-manifest
233243
path: dist-manifest.json
244+
# Create a GitHub Release while uploading all files to it
245+
- name: "Download GitHub Artifacts"
246+
uses: actions/download-artifact@v4
247+
with:
248+
pattern: artifacts-*
249+
path: artifacts
250+
merge-multiple: true
251+
- name: Cleanup
252+
run: |
253+
# Remove the granular manifests
254+
rm -f artifacts/*-dist-manifest.json
255+
- name: Create GitHub Release
256+
env:
257+
PRERELEASE_FLAG: "${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}"
258+
ANNOUNCEMENT_TITLE: "${{ fromJson(steps.host.outputs.manifest).announcement_title }}"
259+
ANNOUNCEMENT_BODY: "${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}"
260+
RELEASE_COMMIT: "${{ github.sha }}"
261+
run: |
262+
# Write and read notes from a file to avoid quoting breaking things
263+
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
264+
265+
gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
234266
235-
# Create a GitHub Release while uploading all files to it
236267
announce:
237268
needs:
238269
- plan
@@ -248,21 +279,3 @@ jobs:
248279
- uses: actions/checkout@v4
249280
with:
250281
submodules: recursive
251-
- name: "Download GitHub Artifacts"
252-
uses: actions/download-artifact@v4
253-
with:
254-
pattern: artifacts-*
255-
path: artifacts
256-
merge-multiple: true
257-
- name: Cleanup
258-
run: |
259-
# Remove the granular manifests
260-
rm -f artifacts/*-dist-manifest.json
261-
- name: Create GitHub Release
262-
uses: ncipollo/release-action@v1
263-
with:
264-
tag: ${{ needs.plan.outputs.tag }}
265-
name: ${{ fromJson(needs.host.outputs.val).announcement_title }}
266-
body: ${{ fromJson(needs.host.outputs.val).announcement_github_body }}
267-
prerelease: ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease }}
268-
artifacts: "artifacts/*"

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ This name should be decided amongst the team before the release.
4242

4343
## Unreleased
4444

45-
[Full list of changes](https://github.com/tweag/topiary/compare/v0.5.0...HEAD)
45+
[Full list of changes](https://github.com/tweag/topiary/compare/v0.5.1...HEAD)
4646

47-
## v0.5.0 - Fragrant Frangipani - 2024-10-22
47+
## v0.5.1 - Fragrant Frangipani - 2024-10-22
4848

49-
[Full list of changes](https://github.com/tweag/topiary/compare/v0.4.0...v0.5.0)
49+
[Full list of changes](https://github.com/tweag/topiary/compare/v0.4.0...v0.5.1)
5050

5151
### Added
5252
- [#705](https://github.com/tweag/topiary/pull/705) Added support for Nickel 1.7 extended pattern formatting

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace.package]
2-
version = "0.5.0"
2+
version = "0.5.1"
33
edition = "2021"
44
authors = ["Tweag"]
55
homepage = "https://topiary.tweag.io"
@@ -34,9 +34,9 @@ lto = "thin"
3434
# Config for 'cargo dist'
3535
[workspace.metadata.dist]
3636
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
37-
cargo-dist-version = "0.13.2"
37+
cargo-dist-version = "0.19.1"
3838
# CI backends to support
39-
ci = ["github"]
39+
ci = "github"
4040
# The installers to generate for each app
4141
installers = ["shell"]
4242
# 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-
4545
pr-run-mode = "plan"
4646
# Whether to install an updater program
4747
install-updater = false
48+
# Path that installers should place binaries in
49+
install-path = "CARGO_HOME"
4850

4951
[workspace.dependencies]
5052
assert_cmd = "2.0"
@@ -89,8 +91,8 @@ wasm-bindgen-futures = "0.4"
8991
wasm-bindgen-test = "0.3"
9092
web-sys = "0.3"
9193

92-
topiary-web-tree-sitter-sys = { version = "0.5.0", path = "./topiary-web-tree-sitter-sys" }
93-
topiary-tree-sitter-facade = { version = "0.5.0", path = "./topiary-tree-sitter-facade" }
94+
topiary-web-tree-sitter-sys = { version = "0.5.1", path = "./topiary-web-tree-sitter-sys" }
95+
topiary-tree-sitter-facade = { version = "0.5.1", path = "./topiary-tree-sitter-facade" }
9496

9597
# tree-sitter-json's dependency on Tree-sitter is looser than ours, so
9698
# we have to pin its version to maintain API compatibility

0 commit comments

Comments
 (0)