Skip to content

Commit

Permalink
Now attach prebuilt binaries to github release
Browse files Browse the repository at this point in the history
  • Loading branch information
ahelwer committed Jan 5, 2023
1 parent 21d6d3f commit b42c12f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 20 deletions.
58 changes: 42 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,59 @@ on:
release:
types: [created]
jobs:
rust-crate:
publish-rust-crate:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build
- name: Publish
uses: actions-rs/cargo@v1
with:
command: build
- name: Check Formatting
uses: actions-rs/cargo@v1
command: publish
args: --token ${{secrets.CRATES_AUTH_TOKEN}}
github-release-binaries:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
binname: tlauc-linux.tar.gz
- os: macos-latest
binname: tlauc-macos.tar.gz
- os: windows-latest
binname: tlauc-windows.zip
fail-fast: false
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
command: fmt
args: --check
- name: Test
toolchain: stable
- name: Build
uses: actions-rs/cargo@v1
with:
command: test
args: -- --nocapture
- name: Publish
uses: actions-rs/cargo@v1
command: build
args: --release
- name: Package Binary
if: matrix.os == 'windows-latest'
shell: pwsh
run: Compress-Archive -Path target/release/tlauc.exe -DestinationPath ${{ matrix.binname }}
- name: Package Binary
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: tar -czvf ${{ matrix.binname }} -C target/release tlauc
- name: Upload Binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
with:
command: publish
args: --token ${{secrets.CRATES_AUTH_TOKEN}}
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ matrix.binname }}
asset_name: ${{ matrix.binname }}
asset_content_type: application/gzip

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tlauc"
description = "Rewrites TLA⁺ specs to use Unicode symbols instead of ASCII, and vice-versa"
version = "0.1.1"
version = "0.1.2"
authors = ["Andrew Helwer <2n8rn1w1f@mozmail.com>"]
repository = "https://github.com/tlaplus-community/tlauc"
license = "MIT"
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ For an optimal TLA⁺ Unicode experience you'll want a monospace font that rende

This crate contains both a library and its command line wrapper.

To install the command line tool:
To get the command line tool; either download it directly from [a release](https://github.com/tlaplus-community/tlauc/releases/latest) or install it with `cargo`:
1. Install rust: https://www.rust-lang.org/tools/install
1. Run `cargo install tlauc`
1. Ensure the [cargo installation directory](https://doc.rust-lang.org/cargo/commands/cargo-install.html#description) is on your path
Expand Down Expand Up @@ -245,6 +245,7 @@ The block comment edge case has not been observed in the wild and so is not yet

## Prior Art

[Ron Pressler](https://pron.github.io/) did some work in early 2017 trying to add Unicode support to SANY; unfortunately this work was not successfully merged.
He also wrote [a similar Unicode conversion tool](https://github.com/pron/tlaplus/tree/unicode-presentation-2/tlatools/src/tla2unicode), which faced many of the same challenges around jlist alignment.
[Ron Pressler](https://pron.github.io/) did some work in early 2017 trying to add Unicode support to SANY.
He also wrote [a similar Unicode conversion tool](https://github.com/pron/tlaplus/tree/unicode-presentation-2/tlatools/src/tla2unicode) in Java, which faced many of the same challenges around jlist alignment.
Unfortunately none of this work was upstreamed.

0 comments on commit b42c12f

Please sign in to comment.