mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
ci: only upload coverage after packaging
This commit is contained in:
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
os: [macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -67,18 +67,16 @@ jobs:
|
||||
src/Rust/target/release/*.exe
|
||||
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@v3
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
directory: ./test
|
||||
fail_ci_if_error: true
|
||||
name: coverage
|
||||
path: test/coverage*.xml
|
||||
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -108,6 +106,12 @@ jobs:
|
||||
name: rust
|
||||
path: src/Rust/target/release
|
||||
|
||||
- name: Download Coverage Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: coverage
|
||||
path: ./coverage
|
||||
|
||||
- name: Build .NET
|
||||
run: dotnet build -c Release /p:PackRustAssets=true
|
||||
|
||||
@@ -117,6 +121,14 @@ jobs:
|
||||
name: packages
|
||||
path: .\build\Release\*.nupkg
|
||||
|
||||
- name: Upload Coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
with:
|
||||
directory: ./coverage
|
||||
fail_ci_if_error: true
|
||||
|
||||
- name: Publish to GitHub Packages
|
||||
shell: pwsh
|
||||
run: dotnet nuget push .\build\Release\*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate
|
||||
Reference in New Issue
Block a user