mirror of
https://github.com/ivabus/roulette
synced 2024-11-23 00:45:09 +03:00
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: .NET
|
|
on: workflow_dispatch
|
|
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: Publish on osx-x64
|
|
run: dotnet publish --runtime osx-x64 -o publish/osx-x64/ --self-contained
|
|
- name: Publish on linux-x64
|
|
run: dotnet publish --runtime linux-x64 -o publish/linux-x64/ --self-contained
|
|
- name: Publish on linux-arm64
|
|
run: dotnet publish --runtime linux-arm64 -o publish/linux-arm64/ --self-contained
|
|
- name: Compress to zip file
|
|
run: tar cf roulette.tar.gz publish/
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: Release ${{ github.ref }}
|
|
draft: false
|
|
prerelease: True
|
|
- name: Upload Release Asset
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./roulette.tar.gz
|
|
asset_name: roulette.tar.gz
|
|
asset_content_type: application/gzip
|