Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
milandjurdjevic authored Jul 4, 2024
1 parent 2bf3362 commit 700620d
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Release
on:
push:
branches: [ "main" ]
tags:
- 'v*'
- 'v*'
pull_request:
branches: [ "main" ]
jobs:
ubuntu-build:
runs-on: ubuntu-latest
Expand All @@ -16,13 +19,13 @@ jobs:
- name: Restore
run: dotnet restore src
- name: Build
run: dotnet build src --no-restore --configuration Release
run: dotnet build src --no-restore --configuration Release
- name: Test
run: dotnet test src --no-build --configuration Release --verbosity normal
- name: Publish
run: dotnet publish src/Analog.Cli --configuration Release --self-contained
run: dotnet publish src/Analog --configuration Release -p:PublishSingleFile=true --self-contained
- name: Zip
run: zip /home/runner/work/analog/analog-linux-x64 /home/runner/work/analog/analog/src/Analog.Cli/bin/Release/net8.0/linux-x64/publish/*
run: zip /home/runner/work/analog/analog-linux-x64 /home/runner/work/analog/analog/src/Analog/bin/Release/net8.0/linux-x64/publish/*
- name: Upload
uses: actions/upload-artifact@v4
with:
Expand All @@ -44,10 +47,10 @@ jobs:
- name: Test
run: dotnet test src --no-build --configuration Release --verbosity normal
- name: Publish
run: dotnet publish src/Analog.Cli --configuration Release --self-contained
run: dotnet publish src/Analog --configuration Release -p:PublishSingleFile=true --self-contained
- name: Zip
shell: pwsh
run: Compress-Archive -Path D:\a\analog\analog\src\Analog.Cli\bin\Release\net8.0\win-x64\publish\* -DestinationPath D:\a\analog\analog-win-x64.zip
run: Compress-Archive -Path D:\a\analog\analog\src\Analog\bin\Release\net8.0\win-x64\publish\* -DestinationPath D:\a\analog\analog-win-x64.zip
- name: Upload
uses: actions/upload-artifact@v4
with:
Expand All @@ -69,16 +72,17 @@ jobs:
- name: Test
run: dotnet test src --no-build --configuration Release --verbosity normal
- name: Publish
run: dotnet publish src/Analog.Cli --configuration Release --self-contained
run: dotnet publish src/Analog --configuration Release -p:PublishSingleFile=true --self-contained
- name: Zip
run: zip /Users/runner/work/analog/analog-osx-x64 /Users/runner/work/analog/analog/src/Analog.Cli/bin/Release/net8.0/osx-x64/publish/*
run: zip /Users/runner/work/analog/analog-osx-x64 /Users/runner/work/analog/analog/src/Analog/bin/Release/net8.0/osx-x64/publish/*
- name: Upload
uses: actions/upload-artifact@v4
with:
name: analog-osx-x64
path: /Users/runner/work/analog/analog-osx-x64.zip
release:
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/v')
needs: [ubuntu-build, windows-build, macos-build]
steps:
- name: Checkout
Expand Down

0 comments on commit 700620d

Please sign in to comment.