Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ezhevita committed Aug 17, 2021
1 parent 7425ef9 commit 73cb4dd
Showing 1 changed file with 44 additions and 42 deletions.
86 changes: 44 additions & 42 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,33 @@ env:
DOTNET_SDK_VERSION: 5.0.x

jobs:
build-generic-netf:
build-generic:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Checkout submodules
run: git submodule update --init --recursive
- name: Checkout code
uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- name: Checkout submodules
run: git submodule update --init --recursive

- name: Restore dependencies
run: dotnet restore
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}

- name: Build with .NET Framework
run: dotnet publish -c Release -f net48 -o out/generic-netf
- name: Restore dependencies
run: dotnet restore

- name: Archive generic-netf release
uses: thedoctor0/zip-release@master
with:
directory: out/generic
type: 'zip'
filename: 'out/generic.zip'
exclusions: '*.json'
- name: Build with .NET Core
run: dotnet publish -c Release -f net5.0 -o out/${{ github.event.repository.name }}-generic

- name: Upload generic-netf artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-generic-netf
path: out/generic-netf.zip
- name: Upload generic artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-generic
path: out/${{ github.event.repository.name }}-generic

build-generic:
build-generic-netf:
runs-on: windows-latest
steps:
- name: Checkout code
Expand All @@ -57,22 +49,14 @@ jobs:
- name: Restore dependencies
run: dotnet restore

- name: Build with .NET Core
run: dotnet publish -c Release -f net5.0 -o out/generic
- name: Build with .NET Framework
run: dotnet publish -c Release -f net48 -o out/${{ github.event.repository.name }}-generic-netf

- name: Archive generic release
uses: thedoctor0/zip-release@master
with:
directory: out/generic
type: 'zip'
filename: 'out/generic.zip'
exclusions: '*.json'

- name: Upload generic artifacts
- name: Upload generic-netf artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-generic
path: out/generic.zip
name: ${{ github.event.repository.name }}-generic-netf
path: out/${{ github.event.repository.name }}-generic-netf

release:
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
Expand All @@ -84,13 +68,31 @@ jobs:
uses: actions/[email protected]
with:
name: ${{ github.event.repository.name }}-generic
path: out
path: out/${{ github.event.repository.name }}-generic

- name: Download generic-netf artifacts
uses: actions/[email protected]
with:
name: ${{ github.event.repository.name }}-generic-netf
path: out
path: out/${{ github.event.repository.name }}-generic-netf

- name: Archive generic release
uses: thedoctor0/zip-release@master
with:
directory: out
path: ${{ github.event.repository.name }}-generic
type: 'zip'
filename: 'generic.zip'
exclusions: '*.json'

- name: Archive generic-netf release
uses: thedoctor0/zip-release@master
with:
directory: out
path: ${{ github.event.repository.name }}-generic-netf
type: 'zip'
filename: 'generic-netf.zip'
exclusions: '*.json'

- name: Create GitHub release
id: github_release
Expand Down

0 comments on commit 73cb4dd

Please sign in to comment.