Skip to content

v0.3.1

v0.3.1 #14

Workflow file for this run

name: release
on:
push:
branches:
- release*
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deps
run: |
sudo apt-get install -y musl-tools
rustup target add x86_64-unknown-linux-musl
- name: Build static executables
run: |
make static
cp target/x86_64-unknown-linux-musl/release/treereduce-{c,java,javascript,lua,rust,souffle,swift} .
- uses: ncipollo/release-action@v1
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
artifacts: "treereduce-c,treereduce-java,treereduce-javascript,treereduce-lua,treereduce-rust,treereduce-souffle,treereduce-swift"
artifactErrorsFailBuild: true
body: "See [CHANGELOG.md](https://github.com/langston-barrett/treereduce/blob/main/doc/CHANGELOG.md)."
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to crates.io
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
# Only push on actual release tags
PUSH: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
for pkg in treereduce{,-c,-java,-javascript,-lua,-rust,-souffle,-swift}; do
if [[ ${PUSH} == true ]]; then
cargo publish --token ${CRATES_IO_TOKEN} -p "${pkg}"
else
cargo publish --dry-run --token ${CRATES_IO_TOKEN} -p "${pkg}"
break
fi
sleep 5
done