Skip to content

Fix incorrect address encoding with leading zeroes (#28), add `ThorNo… #13

Fix incorrect address encoding with leading zeroes (#28), add `ThorNo…

Fix incorrect address encoding with leading zeroes (#28), add `ThorNo… #13

Workflow file for this run

name: Release
on:
push:
tags: [ 'v*' ]
jobs:
release-github:
name: Publish to GitHub releases
runs-on: ubuntu-latest
permissions:
contents: write
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set variables
id: vars
run: |
CHANGELOG=$(awk '/^## v/ {n=NR; i++}; i==1 {if (NR==n) {print "## Release Notes"} else {print}}; i>1 {exit}' CHANGELOG.md \
| python3 -c 'import sys, json; print(json.dumps(sys.stdin.read()))')
echo "changelog=$CHANGELOG" >> $GITHUB_OUTPUT
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
generate_release_notes: true
body: ${{ fromJson(steps.vars.outputs.changelog) }}
release-crate:
name: Publish to crates.io
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Publish crate to crates.io
run: |
name=$(cargo metadata -q --no-deps | jq -r '.packages[0].name')
version=$(cargo metadata -q --no-deps | jq -r '.packages[0].version')
echo "Publishing ${name}-${version}"
cargo publish --token ${{ secrets.CARGO_TOKEN }}