-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump, automatically create github release
- Loading branch information
Showing
2 changed files
with
83 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,29 +10,102 @@ env: | |
DOTNET_SDK_VERSION: 5.0.x | ||
|
||
jobs: | ||
build: | ||
build-generic-netf: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout submodules | ||
run: git submodule update --init --recursive | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }} | ||
|
||
- 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/generic-netf | ||
- name: Upload generic artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-generic | ||
path: out/generic | ||
|
||
- name: Upload generic-netf artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-generic-netf | ||
path: out/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: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }} | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Build with .NET Core | ||
run: dotnet publish -c Release -f net5.0 -o out/generic | ||
|
||
- name: Upload generic artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-generic | ||
path: out/generic | ||
|
||
release: | ||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | ||
needs: [build-generic-netf, build-generic] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download generic artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ github.event.repository.name }}-generic | ||
path: out | ||
|
||
- name: Download generic-netf artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ github.event.repository.name }}-generic-netf | ||
path: out | ||
|
||
- name: Create GitHub release | ||
id: github_release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.event.repository.name }} V${{ github.ref }} | ||
prerelease: true | ||
|
||
- name: Upload generic artifacts to GitHub release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.github_release.outputs.upload_url }} | ||
asset_path: out/generic.zip | ||
asset_name: generic.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload generic-netf artifacts to GitHub release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.github_release.outputs.upload_url }} | ||
asset_path: out/generic-netf.zip | ||
asset_name: generic-netf.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters