diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 00000000..38f73b39 --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,30 @@ +name: package + +on: + push: + tags: + - 'v*.*.*' + +jobs: + linux-build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal -f net6.0 + - name: Pack DivertR + run: dotnet pack --configuration Release --output ./artifacts ./src/DivertR/DivertR.csproj + - name: Nuget Push + run: dotnet nuget push ./artifacts/*.nupkg --source "https://nuget.pkg.github.com/devodo/index.json" --api-key ${{ secrets.PACKAGE_REPOSITORY_TOKEN }} + diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0060f544..d9e14ff5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,7 @@ name: publish on: push: tags: - - 'v*.*.*' + - 'v[0-9]+.[0-9]+.[0-9]+' jobs: linux-build: