Skip to content

Commit

Permalink
Create dotnet-core-publish.yml
Browse files Browse the repository at this point in the history
Builds binaries for all supported operating systems.
  • Loading branch information
FrankenApps authored Aug 3, 2020
1 parent 6418725 commit 5016a74
Showing 1 changed file with 104 additions and 0 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/dotnet-core-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: .NET Core Publish

on:
watch:
types: [started]

jobs:
build-windows:
if: github.actor == github.event.repository.owner.login

runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Install dependencies
run: dotnet restore
- name: Build and Publish Project standalone version
run: dotnet publish -c Release --runtime win10-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained
- name: Rename build artifact
run: cd bin/release/netcoreapp3.1/win10-x64/publish && ren MqttDebugger.exe MqttDebugger-Standalone.exe
- name: Upload windows 64bit standalone executable
uses: actions/upload-artifact@v2
with:
name: mqttDebugger-winx64-standalone.exe
path: bin/release/netcoreapp3.1/win10-x64/publish/MqttDebugger-Standalone.exe
- name: Build and Publish Project framework dependent version
run: dotnet publish -c Release --runtime win10-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --no-self-contained
- name: Upload windows 64bit framework dependent executable
uses: actions/upload-artifact@v2
with:
name: mqttDebugger-winx64.exe
path: bin/release/netcoreapp3.1/win10-x64/publish/MqttDebugger.exe

build-macos:
if: github.actor == github.event.repository.owner.login

runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Install dependencies
run: dotnet restore
- name: Build and Publish Project standalone version
run: dotnet publish -c Release --runtime osx.10.15-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained
- name: Rename build artifact
run: mv bin/release/netcoreapp3.1/osx.10.15-x64/publish/MqttDebugger bin/release/netcoreapp3.1/osx.10.15-x64/publish/MqttDebugger-Standalone
- name: Show Folder
run: cd bin/release/netcoreapp3.1/osx.10.15-x64/publish && ls
- name: Upload macos 64bit standalone executable
uses: actions/upload-artifact@v2
with:
name: mqttDebugger-macx64-standalone.exe
path: bin/release/netcoreapp3.1/osx.10.15-x64/publish/MqttDebugger-Standalone
- name: Build and Publish Project framework dependent version
run: dotnet publish -c Release --runtime osx.10.15-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --no-self-contained
- name: Upload macos 64bit framework dependent executable
uses: actions/upload-artifact@v2
with:
name: mqttDebugger-macx64
path: bin/release/netcoreapp3.1/osx.10.15-x64/publish/MqttDebugger

build-ubuntu:
if: github.actor == github.event.repository.owner.login

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Install dependencies
run: dotnet restore
- name: Build and Publish Project standalone version
run: dotnet publish -c Release --runtime linux-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained
- name: Show Folder1
run: ls
- name: Show Folder
run: cd /home/runner/work/MqttDebugger/MqttDebugger/bin/Release/netcoreapp3.1/linux-x64/publish/ && ls
- name: Rename build artifact
run: mv /home/runner/work/MqttDebugger/MqttDebugger/bin/Release/netcoreapp3.1/linux-x64/publish/MqttDebugger /home/runner/work/MqttDebugger/MqttDebugger/bin/Release/netcoreapp3.1/linux-x64/publish/MqttDebugger-Standalone
- name: Show Folder
run: cd /home/runner/work/MqttDebugger/MqttDebugger/bin/Release/netcoreapp3.1/linux-x64/publish/ && ls
- name: Upload linux 64bit standalone executable
uses: actions/upload-artifact@v2
with:
name: mqttDebugger-linux-x64-standalone.exe
path: /home/runner/work/MqttDebugger/MqttDebugger/bin/Release/netcoreapp3.1/linux-x64/publish/MqttDebugger-Standalone
- name: Build and Publish Project framework dependent version
run: dotnet publish -c Release --runtime linux-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --no-self-contained
- name: Upload linux 64bit framework dependent executable
uses: actions/upload-artifact@v2
with:
name: mqttDebugger-linux-x64
path: /home/runner/work/MqttDebugger/MqttDebugger/bin/Release/netcoreapp3.1/linux-x64/publish/MqttDebugger

0 comments on commit 5016a74

Please sign in to comment.