发布最新依赖版本 #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 - RefAssembly | |
run: dotnet test "./test/ut/Compile/RefAssembly/RefAssembly.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/[email protected] | |
with: | |
token: ${{ secrets.COVERAGE_KEY }} | |
directory: ./coverage/ | |