Skip to content

increase version number #13

increase version number

increase version number #13

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
tags:
- 'v*.*.*'
env:
PROJECT_PATH: TeamSorting/TeamSorting.csproj
WIN_PATH: /home/runner/work/TeamSorting/TeamSorting/TeamSorting/bin/Release/net8.0/win-x64/publish/TeamSorting.exe
WIN_FILE: TeamSorting-win-x64.exe
LINUX_PATH: /home/runner/work/TeamSorting/TeamSorting/TeamSorting/bin/Release/net8.0/linux-x64/publish/TeamSorting
LINUX_FILE: TeamSorting-linux-x64
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build win
run: dotnet publish ${{ env.PROJECT_PATH }} -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
- name: Build linux
run: dotnet publish ${{ env.PROJECT_PATH }} -c Release -r linux-x64 --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
- name: Release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload win artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.WIN_PATH }}
asset_name: ${{ env.WIN_FILE }}
asset_content_type: application/x-msdownload
- name: upload linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.LINUX_PATH }}
asset_name: ${{ env.LINUX_FILE }}
asset_content_type: application/octet-stream