Skip to content

发布

发布 #14

Workflow file for this run

name: Push Codecov
on:
push:
branches:
- 'main'
paths:
- 'CHANGELOG.md'
concurrency: ci-codecov-${{ github.ref }}
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
hasCoverageKey: ${{steps.outter.outputs.HAS_COVERAGE_KEY}}
steps:
- name: 🙂 Output Key
id: outter
run: |
if [ "${{ secrets.COVERAGE_KEY }}" == "" ]; then
echo "HAS_COVERAGE_KEY=false" >> $GITHUB_OUTPUT
else
echo "HAS_COVERAGE_KEY=true" >> $GITHUB_OUTPUT
fi
codecov:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v4
- name: 🚦 Check & Pack Codecov - NatashaFunctionUT
run: dotnet test "./test/ut/NatashaFunctionUT/NatashaFunctionUT.csproj" --nologo -f net6.0 -c Release --collect:"XPlat Code Coverage" --results-directory "./coverage/"
- name: 📶 Push to Codecov
if: ${{ needs.prepare.outputs.hasCoverageKey == 'true' }}
uses: codecov/codecov-action@v3.1.4
with:
token: ${{ secrets.COVERAGE_KEY }}
directory: ./coverage/