Skip to content

Commit

Permalink
Publish on push
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve John committed Jul 1, 2024
1 parent 5b2bbb4 commit 9e16ae5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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: Build Artifacts and Release

on:
push:
tags:
- "v*.*.*"

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Publish and Zip all.
run: ./publish.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
Zen.Desktop.Host.Windows.Intel.zip
Zen.Desktop.Host.macOS.Apple.zip
Zen.Desktop.Host.macOS.Intel.zip
26 changes: 26 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
rm *.zip
dotnet publish ./src/Zen.Desktop.Host/Zen.Desktop.Host.csproj -c Release -r osx-x64 /p:PublishReadyToRun=true /p:TieredCompilation=false --self-contained /p:PublishReadyToRunShowWarnings=true
dotnet publish ./src/Zen.Desktop.Host/Zen.Desktop.Host.csproj -c Release -r osx-arm64 /p:PublishReadyToRun=true /p:TieredCompilation=false --self-contained /p:PublishReadyToRunShowWarnings=true
dotnet publish ./src/Zen.Desktop.Host/Zen.Desktop.Host.csproj -c Release -r win-x64 /p:PublishReadyToRun=true /p:TieredCompilation=false --self-contained /p:PublishReadyToRunShowWarnings=true
cd ./src/Zen.Desktop.Host/bin/Release/net8.0/osx-x64/publish
pwd
chmod +xx Zen.Desktop.Host
rm *.zip
zip -r Zen.Desktop.Host.macOS.Intel.zip *
cd -
mv ./src/Zen.Desktop.Host/bin/Release/net8.0/osx-x64/publish/Zen.Desktop.Host.macOS.Intel.zip .

cd ./src/Zen.Desktop.Host/bin/Release/net8.0/osx-arm64/publish
pwd
chmod +xx Zen.Desktop.Host
rm *.zip
zip -r Zen.Desktop.Host.macOS.Apple.zip *
cd -
mv ./src/Zen.Desktop.Host/bin/Release/net8.0/osx-arm64/publish/Zen.Desktop.Host.macOS.Apple.zip .

cd ./src/Zen.Desktop.Host/bin/Release/net8.0/win-x64/publish
pwd
rm *.zip
zip -r Zen.Desktop.Host.Windows.Intel.zip *
cd -
mv ./src/Zen.Desktop.Host/bin/Release/net8.0/win-x64/publish/Zen.Desktop.Host.Windows.Intel.zip .

0 comments on commit 9e16ae5

Please sign in to comment.