2022-02-09 17:52:20 +03:00
|
|
|
name: Create binaries
|
2022-02-09 16:42:13 +03:00
|
|
|
on:
|
|
|
|
release:
|
2022-02-09 18:01:48 +03:00
|
|
|
types: [created]
|
2022-02-09 16:42:13 +03:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
|
|
|
dotnet-version: 6.0.x
|
|
|
|
- name: Restore dependencies
|
|
|
|
run: dotnet restore
|
|
|
|
- name: Build
|
|
|
|
run: dotnet build --no-restore
|
|
|
|
- name: Test
|
|
|
|
run: dotnet test --no-build --verbosity normal
|
|
|
|
- name: Prepare for building
|
|
|
|
run: mkdir prepublish && mkdir publish
|
|
|
|
- name: Publish on osx-x64
|
|
|
|
run: dotnet publish --runtime osx-x64 -o prepublish/osx-x64/ --self-contained -p:PublishSingleFile=true && mv prepublish/osx-x64/roulette publish/roulette-osx-x64
|
|
|
|
- name: Publish on linux-x64
|
|
|
|
run: dotnet publish --runtime linux-x64 -o prepublish/linux-x64/ --self-contained -p:PublishSingleFile=true && mv prepublish/linux-x64/roulette publish/roulette-linux-x64
|
|
|
|
- name: Publish on linux-arm64
|
|
|
|
run: dotnet publish --runtime linux-arm64 -o prepublish/linux-arm64/ --self-contained -p:PublishSingleFile=true && mv prepublish/linux-arm64/roulette publish/roulette-linux-arm64
|
|
|
|
|
|
|
|
|
|
|
|
- name: Upload To Github Release
|
|
|
|
uses: xresloader/upload-to-github-release@v1.3.2
|
2022-02-09 16:45:48 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-02-09 16:42:13 +03:00
|
|
|
with:
|
|
|
|
file: publish/roulette-osx-x64;publish/roulette-linux-x64;publish/roulette-linux-arm64
|
2022-02-09 17:52:20 +03:00
|
|
|
tags: ${{ github.ref }}
|
|
|
|
|
|
|
|
build-win:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
|
|
|
dotnet-version: 6.0.x
|
|
|
|
- name: Restore dependencies
|
|
|
|
run: dotnet restore
|
|
|
|
- name: Build
|
|
|
|
run: dotnet build --no-restore
|
|
|
|
- name: Test
|
|
|
|
run: dotnet test --no-build --verbosity normal
|
|
|
|
- name: Prepare for building
|
|
|
|
run: mkdir prepublish && mkdir publish
|
|
|
|
- name: Publish on osx-x64
|
|
|
|
run: dotnet publish --runtime win-x64 -o prepublish/win-x64/ --self-contained -p:PublishSingleFile=true && mv prepublish/win-x64/roulette.exe publish/roulette-win-x64.exe
|
|
|
|
- name: Publish on linux-x64
|
|
|
|
run: dotnet publish --runtime win-arm64 -o prepublish/win-arm64/ --self-contained -p:PublishSingleFile=true && mv prepublish/win-arm64/roulette.exe publish/roulette-win-arm64.exe
|
|
|
|
|
|
|
|
|
|
|
|
- name: Upload To Github Release
|
|
|
|
uses: xresloader/upload-to-github-release@v1.3.2
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
file: publish/roulette-win-x64.exe;publish/roulette-win-arm64.exe
|
|
|
|
tags: ${{ github.ref }}
|