Skip to content

v2.4.1

v2.4.1 #102

Workflow file for this run

name: Build
on:
push:
branches:
- master
tags:
- '*'
concurrency:
group: ${{ github.sha }}
cancel-in-progress: true
jobs:
linux:
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-cross-arm64 # https://github.com/dotnet/versions/blob/main/build-info/docker/image-info.dotnet-dotnet-buildtools-prereqs-docker-main.json
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Publish Avalonia
run: |
dotnet publish MusicDecrypto.Commandline/MusicDecrypto.Commandline.csproj -c Release -p:PublishAot=false -o ./generic
dotnet publish MusicDecrypto.Avalonia/MusicDecrypto.Avalonia.csproj -c Release -o ./generic
dotnet publish MusicDecrypto.Avalonia/MusicDecrypto.Avalonia.csproj -c Release -r linux-x64 --sc -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=partial -o ./gui-x64
dotnet publish MusicDecrypto.Avalonia/MusicDecrypto.Avalonia.csproj -c Release -r linux-arm64 --sc -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=partial -o ./gui-arm64
- name: Publish CLI
run: |
dotnet publish MusicDecrypto.Commandline/MusicDecrypto.Commandline.csproj -c Release -r linux-x64 -p:CppCompilerAndLinker=clang-9 -o ./cli-x64
dotnet publish MusicDecrypto.Commandline/MusicDecrypto.Commandline.csproj -c Release -r linux-arm64 -p:CppCompilerAndLinker=clang-9 -p:SysRoot=/crossrootfs/arm64 -p:StripSymbols=false -o ./cli-arm64
- name: Extract tag name
id: tag
if: startsWith(github.ref, 'refs/tags/')
uses: olegtarasov/get-tag@v2.1.2
- name: Pack
if: startsWith(github.ref, 'refs/tags/')
run: |
tar cavf musicdecrypto-all-$GIT_TAG_NAME-net8.0-noarch.tar.xz -C ./generic/ $(cd ./generic/ && echo *)
sha256sum musicdecrypto-all-$GIT_TAG_NAME-net8.0-noarch.tar.xz > musicdecrypto-all-$GIT_TAG_NAME-net7.0-noarch.tar.xz.sha256
aarch64-linux-gnu-strip ./cli-arm64/musicdecrypto
tar cavf musicdecrypto-gui-$GIT_TAG_NAME-linux-x64.tar.xz -C ./gui-x64/ $(cd ./gui-x64/ && echo *)
tar cavf musicdecrypto-gui-$GIT_TAG_NAME-linux-arm64.tar.xz -C ./gui-arm64/ $(cd ./gui-arm64/ && echo *)
tar cavf musicdecrypto-cli-$GIT_TAG_NAME-linux-x64.tar.xz -C ./cli-x64/ musicdecrypto
tar cavf musicdecrypto-cli-$GIT_TAG_NAME-linux-arm64.tar.xz -C ./cli-arm64/ musicdecrypto
sha256sum musicdecrypto-gui-$GIT_TAG_NAME-linux-x64.tar.xz > musicdecrypto-gui-$GIT_TAG_NAME-linux-x64.tar.xz.sha256
sha256sum musicdecrypto-gui-$GIT_TAG_NAME-linux-arm64.tar.xz > musicdecrypto-gui-$GIT_TAG_NAME-linux-arm64.tar.xz.sha256
sha256sum musicdecrypto-cli-$GIT_TAG_NAME-linux-x64.tar.xz > musicdecrypto-cli-$GIT_TAG_NAME-linux-x64.tar.xz.sha256
sha256sum musicdecrypto-cli-$GIT_TAG_NAME-linux-arm64.tar.xz > musicdecrypto-cli-$GIT_TAG_NAME-linux-arm64.tar.xz.sha256
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
musicdecrypto-all-${{ steps.tag.outputs.tag }}-net8.0-noarch.tar.xz
musicdecrypto-all-${{ steps.tag.outputs.tag }}-net8.0-noarch.tar.xz.sha256
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-linux-x64.tar.xz
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-linux-x64.tar.xz.sha256
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-linux-arm64.tar.xz
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-linux-arm64.tar.xz.sha256
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-linux-x64.tar.xz
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-linux-x64.tar.xz.sha256
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-linux-arm64.tar.xz
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-linux-arm64.tar.xz.sha256
macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Publish Avalonia
run: |
dotnet publish MusicDecrypto.Avalonia/MusicDecrypto.Avalonia.csproj -c Release -r osx-x64 --sc -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=partial -o ./gui-x64
dotnet publish MusicDecrypto.Avalonia/MusicDecrypto.Avalonia.csproj -c Release -r osx-arm64 --sc -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=partial -o ./gui-arm64
- name: Publish CLI
run: |
dotnet publish MusicDecrypto.Commandline/MusicDecrypto.Commandline.csproj -c Release -r osx-x64 -o ./cli-x64
dotnet publish MusicDecrypto.Commandline/MusicDecrypto.Commandline.csproj -c Release -r osx-arm64 -o ./cli-arm64
- name: Extract tag name
id: tag
if: startsWith(github.ref, 'refs/tags/')
uses: olegtarasov/get-tag@v2.1.2
- name: Pack
if: startsWith(github.ref, 'refs/tags/')
run: |
tar cavf musicdecrypto-gui-$GIT_TAG_NAME-osx-x64.tar.xz -C ./gui-x64/ $(cd ./gui-x64/ && echo *)
tar cavf musicdecrypto-gui-$GIT_TAG_NAME-osx-arm64.tar.xz -C ./gui-arm64/ $(cd ./gui-arm64/ && echo *)
tar cavf musicdecrypto-cli-$GIT_TAG_NAME-osx-x64.tar.xz -C ./cli-x64/ musicdecrypto
tar cavf musicdecrypto-cli-$GIT_TAG_NAME-osx-arm64.tar.xz -C ./cli-arm64/ musicdecrypto
shasum -a 256 musicdecrypto-gui-$GIT_TAG_NAME-osx-x64.tar.xz > musicdecrypto-gui-$GIT_TAG_NAME-osx-x64.tar.xz.sha256
shasum -a 256 musicdecrypto-gui-$GIT_TAG_NAME-osx-arm64.tar.xz > musicdecrypto-gui-$GIT_TAG_NAME-osx-arm64.tar.xz.sha256
shasum -a 256 musicdecrypto-cli-$GIT_TAG_NAME-osx-x64.tar.xz > musicdecrypto-cli-$GIT_TAG_NAME-osx-x64.tar.xz.sha256
shasum -a 256 musicdecrypto-cli-$GIT_TAG_NAME-osx-arm64.tar.xz > musicdecrypto-cli-$GIT_TAG_NAME-osx-arm64.tar.xz.sha256
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-osx-x64.tar.xz
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-osx-x64.tar.xz.sha256
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-osx-arm64.tar.xz
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-osx-arm64.tar.xz.sha256
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-osx-x64.tar.xz
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-osx-x64.tar.xz.sha256
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-osx-arm64.tar.xz
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-osx-arm64.tar.xz.sha256
win:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish Avalonia
run: |
dotnet publish MusicDecrypto.Avalonia/MusicDecrypto.Avalonia.csproj -c Release -r win-x64 --sc -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=partial -o ./gui-x64
dotnet publish MusicDecrypto.Avalonia/MusicDecrypto.Avalonia.csproj -c Release -r win-arm64 --sc -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=partial -o ./gui-arm64
- name: Publish CLI
run: |
dotnet publish MusicDecrypto.Commandline/MusicDecrypto.Commandline.csproj -c Release -r win-x64 -o ./cli-x64
dotnet publish MusicDecrypto.Commandline/MusicDecrypto.Commandline.csproj -c Release -r win-arm64 -o ./cli-arm64
- name: Extract tag name
id: tag
if: startsWith(github.ref, 'refs/tags/')
uses: olegtarasov/get-tag@v2.1.2
- name: Pack
if: startsWith(github.ref, 'refs/tags/')
run: |
7z a musicdecrypto-gui-$env:GIT_TAG_NAME-win-x64.7z .\gui-x64\*
7z a musicdecrypto-gui-$env:GIT_TAG_NAME-win-arm64.7z .\gui-arm64\*
7z a musicdecrypto-cli-$env:GIT_TAG_NAME-win-x64.7z .\cli-x64\musicdecrypto.exe
7z a musicdecrypto-cli-$env:GIT_TAG_NAME-win-arm64.7z .\cli-arm64\musicdecrypto.exe
(Get-FileHash musicdecrypto-gui-$env:GIT_TAG_NAME-win-x64.7z SHA256).Hash + " musicdecrypto-gui-$env:GIT_TAG_NAME-win-x64.7z" > musicdecrypto-gui-$env:GIT_TAG_NAME-win-x64.7z.sha256
(Get-FileHash musicdecrypto-gui-$env:GIT_TAG_NAME-win-arm64.7z SHA256).Hash + " musicdecrypto-gui-$env:GIT_TAG_NAME-win-arm64.7z" > musicdecrypto-gui-$env:GIT_TAG_NAME-win-arm64.7z.sha256
(Get-FileHash musicdecrypto-cli-$env:GIT_TAG_NAME-win-x64.7z SHA256).Hash + " musicdecrypto-cli-$env:GIT_TAG_NAME-win-x64.7z" > musicdecrypto-cli-$env:GIT_TAG_NAME-win-x64.7z.sha256
(Get-FileHash musicdecrypto-cli-$env:GIT_TAG_NAME-win-arm64.7z SHA256).Hash + " musicdecrypto-cli-$env:GIT_TAG_NAME-win-arm64.7z" > musicdecrypto-cli-$env:GIT_TAG_NAME-win-arm64.7z.sha256
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-win-x64.7z
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-win-x64.7z.sha256
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-win-arm64.7z
musicdecrypto-gui-${{ steps.tag.outputs.tag }}-win-arm64.7z.sha256
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-win-x64.7z
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-win-x64.7z.sha256
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-win-arm64.7z
musicdecrypto-cli-${{ steps.tag.outputs.tag }}-win-arm64.7z.sha256
body: |-
- `noarch` variant depends on [.NET Runtime](https://dotnet.microsoft.com/en-us/download);
- `x64` variant of CLI was built targeting `x86-64-v3` (AVX2).
nuget:
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish library
run: dotnet pack MusicDecrypto.Library/MusicDecrypto.Library.csproj -c Release -o .
- name: NuGet Release
run: dotnet nuget push MusicDecrypto.Library*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json