Skip to content

Commit

Permalink
Create crawlers.playwright.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Velka-DEV authored Jan 30, 2023
1 parent 0a1ce40 commit c727e9e
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/crawlers.playwright.yml
Original file line number Diff line number Diff line change
@@ -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: '(?:<Version>)(\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

0 comments on commit c727e9e

Please sign in to comment.