2022-02-10 16:33:29 +03:00
|
|
|
name: create-binaries
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-02-10 20:43:59 +03:00
|
|
|
runs-on: macos-latest
|
2022-02-10 16:33:29 +03:00
|
|
|
steps:
|
2022-03-02 01:42:37 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-10 16:33:29 +03:00
|
|
|
- name: Setup .NET
|
2022-02-26 00:35:26 +03:00
|
|
|
uses: actions/setup-dotnet@v2
|
2022-02-10 16:33:29 +03:00
|
|
|
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 publish
|
|
|
|
- name: Create binary for 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
|
2022-02-10 20:43:59 +03:00
|
|
|
- name: Create binary for osx-arm64
|
|
|
|
run: |
|
|
|
|
dotnet publish --runtime osx-arm64 -o prepublish/osx-arm64/ --self-contained -p:PublishSingleFile=true
|
|
|
|
mv prepublish/osx-arm64/roulette publish/roulette-osx-arm64
|
2022-02-10 16:33:29 +03:00
|
|
|
- name: Create binary for 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: Create binary for 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: Create binary for linux-musl-x64
|
|
|
|
run: |
|
|
|
|
dotnet publish --runtime linux-musl-x64 -o prepublish/linux-musl-x64/ --self-contained -p:PublishSingleFile=true
|
2022-02-10 18:24:00 +03:00
|
|
|
mv prepublish/linux-musl-x64/roulette publish/roulette-linux-musl-x64
|
|
|
|
- name: Create binary for linux-musl-arm64
|
|
|
|
run: |
|
2022-02-10 18:28:09 +03:00
|
|
|
dotnet publish --runtime linux-musl-arm64 -o prepublish/linux-musl-arm64/ --self-contained -p:PublishSingleFile=true
|
2022-02-10 18:24:00 +03:00
|
|
|
mv prepublish/linux-musl-arm64/roulette publish/roulette-linux-musl-arm64
|
2022-02-10 16:33:29 +03:00
|
|
|
- name: Create binary for win-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: Create binary for win-arm64
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2022-02-10 20:35:31 +03:00
|
|
|
- name: Upload To Github Release
|
2022-03-26 00:32:42 +03:00
|
|
|
uses: xresloader/upload-to-github-release@v1.3.3
|
2022-02-10 20:35:31 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
file: publish/*
|
|
|
|
tags: ${{ github.ref }}
|