From c727e9e00dad03136693627a02d01cc84598b3e0 Mon Sep 17 00:00:00 2001 From: Velka <59120414+Velka-DEV@users.noreply.github.com> Date: Mon, 30 Jan 2023 13:39:24 +0100 Subject: [PATCH] Create crawlers.playwright.yml --- .github/workflows/crawlers.playwright.yml | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/crawlers.playwright.yml diff --git a/.github/workflows/crawlers.playwright.yml b/.github/workflows/crawlers.playwright.yml new file mode 100644 index 0000000..eae1b85 --- /dev/null +++ b/.github/workflows/crawlers.playwright.yml @@ -0,0 +1,45 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: Migale.Crawlers.Playwright nuget publish + +on: + create: + type: [ "tag" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + + - name: Read csproj + uses: juliangruber/read-file-action@v1 + id: read-csproj + with: + path: src/Migale.Crawlers.Playwright/Migale.Crawlers.Playwright.csproj + + - name: Read version + uses: actions-ecosystem/action-regex-match@v2 + id: version-regex + with: + text: ${{ steps.read-csproj.outputs.content }} + regex: '(?:)(\d*\.\d*\.\d*)(?:<\/Version>)' + + - name: Restore dependencies + run: dotnet restore src/Migale.Crawlers.Playwright/Migale.Crawlers.Playwright.csproj + + - name: Build + run: dotnet build src/Migale.Crawlers.Playwright/Migale.Crawlers.Playwright.csproj -c Release --no-restore + + - name: Test + run: dotnet test --no-build --verbosity normal + + - name: Publish nuget package + run: dotnet nuget push src/Migale.Crawlers.Playwright/bin/Release/Migale.Crawlers.Playwright.${{ steps.version-regex.outputs.group1 }}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json