Skip to content

[enh.]添加Gitea软件包自托管, 避免本地代码每次都需要编译. #118

[enh.]添加Gitea软件包自托管, 避免本地代码每次都需要编译.

[enh.]添加Gitea软件包自托管, 避免本地代码每次都需要编译. #118

# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
name: Build
on:
push:
pull_request:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Microsoft OpenJDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'microsoft'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Build with Gradle
run: ./gradlew --no-daemon --parallel build -x test
# 编译成功. 上报代码覆盖率结果
- name: Generate Codecov Report
# if: ${{ failure() }}
if: ${{ success() }}
run: ./gradlew codeCoverageReport
# https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: codecov-struct-util
fail_ci_if_error: true
verbose: true