diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5eea396..d035539 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: ๐Ÿ’ฟ CI +name: CI on: push: @@ -13,12 +13,12 @@ on: jobs: build: - name: ๐Ÿญ Build & Test + name: Build & Test runs-on: ubuntu-22.04 steps: - - name: ๐Ÿšš Checkout + - name: Checkout uses: actions/checkout@v3 - - name: ๐Ÿ›  Setup .NET + - name: Setup .NET uses: actions/setup-dotnet@v3 with: dotnet-version: | @@ -30,21 +30,21 @@ jobs: 6.0.x 7.0.x - - name: โš™ Restore + - name: Restore run: dotnet restore - - name: ๐Ÿญ Build + - name: Build run: dotnet build --no-restore -c Release -p:ContinuousIntegrationBuild=true - - name: ๐Ÿงช Run tests + - name: Run tests run: dotnet test --no-build -c Release --filter FullyQualifiedName\!~Tests.Integration -p:CollectCoverage=true -e:CoverletOutputFormat=opencover - - name: โ˜ข Publish to Codecov + - name: Publish to Codecov uses: codecov/codecov-action@v3 - - name: ๐Ÿ—œ Pack Dev artifacts + - name: Pack Dev artifacts if: github.ref == 'refs/heads/main' run: dotnet pack --no-build -c Release --version-suffix dev-$(date +%s)-${GITHUB_SHA::7} - - name: ๐Ÿ—œ Pack artifacts + - name: Pack artifacts if: startsWith(github.ref, 'refs/tags/v') run: dotnet pack --no-build -c Release - - name: ๐Ÿ“ค Upload artifacts + - name: Upload artifacts if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') uses: actions/upload-artifact@v3 with: @@ -52,26 +52,26 @@ jobs: path: src/**/*nupkg github: - name: ๐Ÿš€ Deploy to GitHub + name: Deploy to GitHub needs: [build] if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-22.04 steps: - - name: ๐Ÿ“ฅ Download artifacts + - name: Download artifacts uses: actions/download-artifact@v3 with: name: nupkgs - - name: ๐Ÿ“ฆ Push to pkg.github.com + - name: Push to pkg.github.com run: dotnet nuget push "**/*.nupkg" -s https://nuget.pkg.github.com/prom-client-net/index.json -k ${{ secrets.GH_FULL_PAT }} --skip-duplicate nuget: - name: ๐Ÿš€ Deploy to NuGet + name: Deploy to NuGet needs: [build] if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-22.04 steps: - - name: ๐Ÿ“ฅ Download artifacts + - name: Download artifacts uses: actions/download-artifact@v3 with: name: nupkgs - - name: ๐Ÿ“ฆ Push to nuget.org + - name: Push to nuget.org run: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }}