From 50aacd79444ecc7d4b91ee325e45c9430e3dce23 Mon Sep 17 00:00:00 2001 From: UltimateCoder Date: Mon, 25 Nov 2024 21:42:17 +0100 Subject: [PATCH] Add .github/workflows/nuget-preview.yml --- .github/workflows/nuget-preview.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/nuget-preview.yml diff --git a/.github/workflows/nuget-preview.yml b/.github/workflows/nuget-preview.yml new file mode 100644 index 0000000..d30fb1e --- /dev/null +++ b/.github/workflows/nuget-preview.yml @@ -0,0 +1,27 @@ +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+-preview[0-9][0-9][0-9]" + +env: + PACKAGE_VERSION: ${GITHUB_REF/refs\/tags\/v/} + PACKAGE_OWNER: ${{ github.repository_owner }} + PACKAGE_NAME: AspNetCore.Identity.MongoDbCore.${{ env.PACKAGE_VERSION }}.nupkg + PACKAGE_SOURCE: https://git.home.cuco.li/api/packages/${{ env.PACKAGE_OWNER }}/nuget/index.json + PACKAGE_TOKEN: ${{ github.token }} + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v2 + #- name: Set VERSION variable from tag + # run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV + - name: Pack + run: dotnet pack --configuration Release /p:Version=${{ env.PACKAGE_VERSION }} --output . + - name: Push + run: dotnet nuget push ${{ env.PACKAGE_NAME }} --source ${{ env.PACKAGE_SOURCE }} --api-key ${GITHUB_TOKEN} + env: + GITHUB_TOKEN: ${{ env.PACKAGE_TOKEN }} \ No newline at end of file