Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release Binary

on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
- 'v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
Comment thread
leynos marked this conversation as resolved.
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build release binary
run: cargo build --release
- name: Package binary
id: package
run: |
mkdir -p dist
cp target/release/mdtablefix dist/mdtablefix-linux
version="${GITHUB_REF_NAME#v}"
cd dist
tar -czf "mdtablefix-${version}-linux.tar.gz" mdtablefix-linux
echo "version=${version}" >> "$GITHUB_OUTPUT"
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
- name: Upload to release
uses: softprops/action-gh-release@v1
with:
Comment thread
leynos marked this conversation as resolved.
files: dist/mdtablefix-${{ steps.package.outputs.version }}-linux.tar.gz
prerelease: ${{ contains(github.ref, '-') }}

Loading