link bee.net on nuget and minor refactoring #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish stable release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
release: | |
name: Release | |
strategy: | |
matrix: | |
kind: [ | |
'linux-x64', | |
'linux-arm', | |
'linux-arm64', | |
'linux-selfcont-x64', | |
'linux-selfcont-arm', | |
'linux-selfcont-arm64', | |
'macos-x64', | |
'macos-arm64', | |
'macos-selfcont-x64', | |
'macos-selfcont-arm64', | |
'windows-x86', | |
'windows-x64', | |
'windows-arm64', | |
'windows-selfcont-x86', | |
'windows-selfcont-x64', | |
'windows-selfcont-arm64'] | |
include: | |
- kind: linux-x64 | |
os: ubuntu-latest | |
target: linux-x64 | |
frameworktype: --no-self-contained | |
- kind: linux-arm | |
os: ubuntu-latest | |
target: linux-arm | |
frameworktype: --no-self-contained | |
- kind: linux-arm64 | |
os: ubuntu-latest | |
target: linux-arm64 | |
frameworktype: --no-self-contained | |
- kind: linux-selfcont-x64 | |
os: ubuntu-latest | |
target: linux-x64 | |
frameworktype: --self-contained | |
- kind: linux-selfcont-arm | |
os: ubuntu-latest | |
target: linux-arm | |
frameworktype: --self-contained | |
- kind: linux-selfcont-arm64 | |
os: ubuntu-latest | |
target: linux-arm64 | |
frameworktype: --self-contained | |
- kind: macos-x64 | |
os: macOS-latest | |
target: osx-x64 | |
frameworktype: --no-self-contained | |
- kind: macos-arm64 | |
os: macOS-latest | |
target: osx-arm64 | |
frameworktype: --no-self-contained | |
- kind: macos-selfcont-x64 | |
os: macOS-latest | |
target: osx-x64 | |
frameworktype: --self-contained | |
- kind: macos-selfcont-arm64 | |
os: macOS-latest | |
target: osx-arm64 | |
frameworktype: --self-contained | |
- kind: windows-x86 | |
os: windows-latest | |
target: win-x86 | |
frameworktype: --no-self-contained | |
- kind: windows-x64 | |
os: windows-latest | |
target: win-x64 | |
frameworktype: --no-self-contained | |
- kind: windows-arm64 | |
os: windows-latest | |
target: win-arm64 | |
frameworktype: --no-self-contained | |
- kind: windows-selfcont-x86 | |
os: windows-latest | |
target: win-x86 | |
frameworktype: --self-contained | |
- kind: windows-selfcont-x64 | |
os: windows-latest | |
target: win-x64 | |
frameworktype: --self-contained | |
- kind: windows-selfcont-arm64 | |
os: windows-latest | |
target: win-arm64 | |
frameworktype: --self-contained | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build Bee.Net Stats project | |
shell: bash | |
run: | | |
tag=$(git describe --tags --abbrev=0) | |
release_name="beenet-stats-$tag-${{ matrix.kind }}" | |
# Build everything | |
dotnet publish src/BeeNetStats/BeeNetStats.csproj --runtime "${{ matrix.target }}" "${{ matrix.frameworktype }}" -c Release -o "$release_name" | |
# Pack files | |
if [ "${{ matrix.kind }}" == windows* ]; then | |
7z a -tzip "${release_name}.zip" "./${release_name}/*" | |
else | |
tar czvf "${release_name}.tar.gz" "$release_name" | |
fi | |
- name: Publish | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
beenet-stats-* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |