From 884638a3509509b2b631cd774ff4ed3c7fcb0200 Mon Sep 17 00:00:00 2001 From: Oskar Gewalli Date: Mon, 29 Jan 2024 16:49:03 +0200 Subject: [PATCH] Release package workflow --- .github/workflows/release-package.yml | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release-package.yml diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml new file mode 100644 index 000000000..7938612ff --- /dev/null +++ b/.github/workflows/release-package.yml @@ -0,0 +1,43 @@ +name: Build release package + +env: + # Stop wasting time caching packages + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + # Disable sending usage data to Microsoft + DOTNET_CLI_TELEMETRY_OPTOUT: true + +on: + push: + tags: ['v**'] +jobs: + package: + runs-on: windows-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 8.0.x + 7.0.x + 6.0.x + - name: Restore + run: git submodule update --init --recursive + - name: Package + run: dotnet pack build.proj + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: nupkg + path: ./bin/nupkg/*.nupkg + - name: Push to GitHub Feed + shell: bash + run: | + for f in ./bin/nupkg/*.nupkg + do + echo $f + dotnet nuget push $f -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json + done \ No newline at end of file