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 956cb46 commit 33f9742
Showing 1 changed file with 45 additions and 41 deletions.
86 changes: 45 additions & 41 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +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:
path: out/generic-netf
type: 'zip'
filename: 'out/generic-netf.zip'
- 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 @@ -56,21 +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: Archive generic release
uses: thedoctor0/zip-release@master
with:
path: out/generic
type: 'zip'
filename: 'out/generic.zip'
- name: Build with .NET Framework
run: dotnet publish -c Release -f net48 -o out/${{ github.event.repository.name }}-generic-netf

- 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 @@ -82,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 Expand Up @@ -117,4 +121,4 @@ jobs:
upload_url: ${{ steps.github_release.outputs.upload_url }}
asset_path: out/generic-netf.zip
asset_name: generic-netf.zip
asset_content_type: application/zip
asset_content_type: application/zip

0 comments on commit 33f9742

Please sign in to comment.