Skip to content

.NET Version release #289

.NET Version release

.NET Version release #289

Workflow file for this run

name: .NET Version release
on:
push:
tags:
- 'v*.*.*'
paths-ignore:
- '**.md'
- '.github/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Install dependencies
run: dotnet restore
- name: Get the version
id: get_version
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -d 'v' -f 2)" >> $GITHUB_OUTPUT
#run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | cut -d "v" -f 2)
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n Microting.EformAngularFrontendBase.Tests/Microting.EformAngularFrontendBase.Tests.csproj
- name: Pack
run: dotnet pack Microting.EformAngularFrontendBase/Microting.EformAngularFrontendBase.csproj -c Release -o ./artifacts -p:PackageVersion=${{ steps.get_version.outputs.VERSION }}
- name: Push generated package to GitHub registry
run: dotnet nuget push /home/runner/work/eform-angular-frontend-base/eform-angular-frontend-base/artifacts/Microting.EformAngularFrontendBase.${{ steps.get_version.outputs.VERSION }}.nupkg -k ${{secrets.NUGET_SECRET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
- name: Notify slack fail
if: ${{ failure() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel_id: CC04FGH5K
status: FAILED
color: danger