From ca9bb9c36ff525a0213dd1d5a9a012189b8e8f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Z=CC=8Celjko=20Baranek?= Date: Mon, 18 Dec 2023 13:32:44 +0100 Subject: [PATCH] ci: add nuget build pipeline --- .github/workflows/release.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..b119483 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,33 @@ +name: 'Release Madware.Furs' +on: + release: + types: [published] +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Generate release name + env: + REF_NAME: ${{ github.ref_name }} + run: | + echo "BUILD_VERSION=${REF_NAME//v/}" >> $GITHUB_ENV + echo "publish_filename=madware-furs-$REF_NAME.zip" >> $GITHUB_ENV + + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + source-url: https://nuget.pkg.github.com/BunnyWay/index.json + env: + NUGET_AUTH_TOKEN: ${{ secrets.BUNNYNET_DEVOPS_PAT }} + - name: build + run: dotnet build -c Release + + - name: test + run: dotnet test -c Release --no-build --no-restore + + - name: Pack Madware.Furs + run: dotnet pack -c Release --no-build --no-restore FursTax/FursTax.csproj + + - name: Publish NuGet package + run: dotnet nuget push FursTax/bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/BunnyWay/index.json" \ No newline at end of file