Update AspectInjector.Package.csproj #158
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
name: Application | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '**' | |
pull_request: | |
env: | |
app_release: false | |
app_conf: Release | |
nuget_url: https://api.nuget.org/v3/index.json | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.x | |
- uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Get version | |
run: echo "app_version=`git describe --tags`" >> $GITHUB_ENV | |
- name: Get release status | |
run: echo "app_release=`(git describe --tags --exact-match>/dev/null 2>&1 && echo true) || echo false`" >> $GITHUB_ENV | |
- name: Status | |
run: echo "Release=$app_release, version=$app_version" | |
- name: Compile | |
run: dotnet build -c $app_conf -p:Version=$app_version -p:InformationalVersion="$app_version:$GITHUB_SHA" | |
- name: Test net6 | |
run: dotnet test -c $app_conf --no-build -f net6.0 | |
- name: Test netcore3 | |
run: dotnet test -c $app_conf --no-build -f netcoreapp3.1 | |
- name: Pack | |
env: | |
CODESIGN_CERT: ${{ secrets.CODESIGN_PEM }} | |
working-directory: nuget | |
run: | | |
echo "$CODESIGN_CERT" > cert.pem | |
chmod +x ./rcodesign | |
dotnet pack -c $app_conf --no-build -o `pwd`/artifacts -p:Version=$app_version -p:CommitSHA=$GITHUB_SHA -p:OSXCertPath=cert.pem | |
rm cert.pem | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: artifacts | |
path: ./nuget/artifacts | |
- name: Publish | |
if: env.app_release == 'true' | |
env: | |
NUGETKEY: ${{ secrets.NUGET_KEY }} | |
working-directory: nuget/artifacts | |
run: dotnet nuget push ./AspectInjector.$app_version.nupkg -s $nuget_url -k $NUGETKEY |