parent
fb612ea6ab
commit
064801380b
48
.github/workflows/dotnet-publish.yml
vendored
Normal file
48
.github/workflows/dotnet-publish.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
# 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: publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: '6.0.x' # The .NET SDK version to use
|
||||
DOTNET_SLN: './Source/Libation.sln'
|
||||
DOTNET_CONFIGURATION: 'Release'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
source-url: https://nuget.pkg.github.com/<owner>/index.json
|
||||
env:
|
||||
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore ${{ DOTNET_SLN }}
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration ${{ env.DOTNET_CONFIGURATION }} --no-restore ${{ DOTNET_SLN }}
|
||||
|
||||
- name: Test
|
||||
run: dotnet test --configuration ${{ env.DOTNET_CONFIGURATION }} --no-build --verbosity normal ${{ DOTNET_SLN }}
|
||||
|
||||
- name: Zip Artifact
|
||||
run: zip -r Libation.${{ github.ref_name }}.zip ./Source/bin/${{ env.DOTNET_CONFIGURATION }}/*
|
||||
|
||||
- name: Publish Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Libation ${{ github.ref_name }}
|
||||
path: Libation.${{ github.ref_name }}.zip
|
||||
if-no-files-found: error
|
||||
37
.github/workflows/dotnet-validate.yml
vendored
Normal file
37
.github/workflows/dotnet-validate.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# 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: validate
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: '6.0.x' # The .NET SDK version to use
|
||||
DOTNET_SLN: './Source/Libation.sln'
|
||||
DOTNET_CONFIGURATION: 'Release'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore ${{ env.DOTNET_SLN }}
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration ${{ env.DOTNET_CONFIGURATION }} --no-restore ${{ env.DOTNET_SLN }}
|
||||
|
||||
- name: Test
|
||||
run: dotnet test --configuration ${{ env.DOTNET_CONFIGURATION }} --no-build --verbosity normal ${{ env.DOTNET_SLN }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user