Skip to content

v0.1

v0.1 #12

Workflow file for this run

name: Publish
on:
release:
types: [published]
jobs:
release:
name: Release
strategy:
matrix:
kind: ['linux', 'windows', 'macOS', 'linux-arm', 'windows-arm', 'macOS-arm']
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
- kind: windows
os: windows-latest
target: win-x64
- kind: macOS
os: macos-latest
target: osx-x64
- kind: linux-arm
os: ubuntu-latest
target: linux-arm64
- kind: windows-arm
os: windows-latest
target: win-arm64
- kind: macOS-arm
os: macos-latest
target: osx-arm64
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
release_name="wcc-$tag-${{ matrix.target }}"
# Build everything
dotnet publish WebsiteCertificateChecker/WebsiteCertificateChecker.csproj --runtime "${{ matrix.target }}" -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -c Release -o "$release_name"
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ] || [ "${{ matrix.target }}" == "win-arm64" ]; 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@v2
with:
files: "wcc*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}