Skip to content

v1.0.25

v1.0.25 #55

Workflow file for this run

name: Publish
on:
release:
types: [published]
jobs:
release:
name: Release
strategy:
matrix:
kind: ["linux", "linux-arm", "windows", "macOS"]
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
- kind: linux-arm
os: ubuntu-latest
target: linux-arm
- kind: windows
os: windows-latest
target: win-x64
- kind: macOS
os: macos-latest
target: osx-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v1
- name: Build
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
release_name="sanchez-$tag-${{ matrix.target }}"
# Build everything
dotnet publish Sanchez/Sanchez.csproj -r "${{ matrix.target }}" -c Release -o "$release_name" -p:PublishSingleFile=true --self-contained
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
# Pack to zip for Windows
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name}.tar.gz" "$release_name"
fi
# Delete output directory
rm -r "$release_name"
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: "sanchez*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}