Skip to content

chore(deps): update codecov/codecov-action action to v5 (#809) #2620

chore(deps): update codecov/codecov-action action to v5 (#809)

chore(deps): update codecov/codecov-action action to v5 (#809) #2620

Workflow file for this run

name: CICD
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'alpha'
- 'beta'
- 'dev'
pull_request:
types: [opened, reopened, synchronize]
jobs:
build-test:
name: Build & Test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --collect:"XPlat Code Coverage" --no-build --logger "trx;LogFileName=test-results.trx"
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: KubeUI Tests
path: tests/KubeUI.Tests/TestResults/test-results.trx
reporter: dotnet-trx
- name: Coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.cobertura.xml
fail_ci_if_error: false
semantic-release:
name: Bump Version
needs: [build-test]
runs-on: ubuntu-latest
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ (steps.semantic.outputs.new_release_published && steps.semantic.outputs.new_release_version) || '0.0.1' }}
steps:
- uses: actions/checkout@v4
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-matrix:
name: Publish Installers
runs-on: ${{ matrix.runs-on }}
needs: [semantic-release]
strategy:
matrix:
include:
- rid: win-x64
fileName: KubeUI.Desktop.exe
runs-on: windows-latest
packParam: --icon ../KubeUI/Assets/icon.ico
- rid: win-arm64
fileName: KubeUI.Desktop.exe
runs-on: windows-latest
packParam: --icon ../KubeUI/Assets/icon.ico
- rid: linux-x64
fileName: KubeUI.Desktop
runs-on: ubuntu-latest
packParam: ''
- rid: linux-arm64
fileName: KubeUI.Desktop
runs-on: ubuntu-latest
packParam: ''
- rid: osx-x64
fileName: KubeUI.Desktop
runs-on: macos-latest
packParam: --icon ../KubeUI/Assets/icon.icns --plist info.plist
- rid: osx-arm64
fileName: KubeUI.Desktop
runs-on: macos-latest
packParam: --icon ../KubeUI/Assets/icon.icns --plist info.plist
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install Velopack
run: dotnet tool install -g vpk
- name: Install Velopack Deps
if: matrix.runs-on == 'ubuntu-latest'
run: sudo apt install libfuse2
- name: Publish
working-directory: src/KubeUI.Desktop
run: dotnet publish -c Release -r ${{ matrix.rid }} -o bin/publish -p:Version=${{ needs.semantic-release.outputs.new_release_version }}
- name: Replace single file
if: matrix.runs-on == 'macos-latest'
uses: richardrigutins/replace-in-files@v2
with:
files: 'src/KubeUI.Desktop/info.plist'
search-text: '{{version}}'
replacement-text: ${{ needs.semantic-release.outputs.new_release_version }}
- name: Create Release
working-directory: src/KubeUI.Desktop
run: |
vpk download github --repoUrl https://github.com/${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }} -c ${{ matrix.rid }} --pre
vpk pack --packTitle KubeUI -u KubeUI -v ${{ needs.semantic-release.outputs.new_release_version }} -p bin/publish -c ${{ matrix.rid }} -e ${{ matrix.fileName }} -o packed ${{ matrix.packParam }}
- name: Remove unnecessary assets
working-directory: src/KubeUI.Desktop
shell: pwsh
run: |
Remove-Item -Path packed/assets.*
Remove-Item -Path packed/RELEASES-*
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.rid }}-artifacts
path: src/KubeUI.Desktop/packed
release:
if: needs.semantic-release.outputs.new_release_published == 'true'
name: Create Release
needs: [semantic-release, publish-matrix]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist/
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}