Skip to content

Don't panic on invalid SZ property #17

Don't panic on invalid SZ property

Don't panic on invalid SZ property #17

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [linux, macos, windows]
include:
- build: linux
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-musl
archive-name: sgf-render-linux.tar.gz
- build: macos
os: macos-latest
rust: nightly
target: x86_64-apple-darwin
archive-name: sgf-render-macos.tar.gz
- build: windows
os: windows-2019
rust: nightly-x86_64-msvc
target: x86_64-pc-windows-msvc
archive-name: sgf-render-windows.7z
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- name: Build binary
run: cargo build --verbose --release --target ${{ matrix.target }}
env:
RUST_BACKTRACE: 1
- name: Strip binary (linux and macos)
if: matrix.build == 'linux' || matrix.build == 'macos'
run: strip "target/${{ matrix.target }}/release/sgf-render"
- name: Build archive
shell: bash
run: |
mkdir archive
cp LICENSE FONT-LICENSE README.md archive/
cd archive
if [ "${{ matrix.build }}" = "windows" ]; then
cp "../target/${{ matrix.target }}/release/sgf-render.exe" ./
7z a "${{ matrix.archive-name }}" *
else
cp "../target/${{ matrix.target }}/release/sgf-render" ./
tar -czf "${{ matrix.archive-name }}" *
fi
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.archive-name }}
path: archive/${{ matrix.archive-name }}
make_deb:
name: Make .deb
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Build .deb
id: deb
run: |
cargo install cargo-deb
debfile=$(cargo deb)
result=$?
echo "debfile=$(basename $debfile)" >> "$GITHUB_OUTPUT"
exit $result
- name: Upload .deb
uses: actions/upload-artifact@v4
with:
name: ${{ steps.deb.outputs.debfile }}
path: target/debian/${{ steps.deb.outputs.debfile }}
release:
name: Create release
needs: [build, make_deb]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
draft: true
files: |
artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}