diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 215dafc..5ca6cda 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -10,8 +10,6 @@ on: jobs: build: -# 配置权限 - permissions: write-all runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -25,21 +23,16 @@ jobs: cache: maven - name: Build with Maven run: mvn -B package --file pom.xml -# 将打包好的 Jar 包 放到 staging 文件夹 - run: mkdir staging && cp target/*.jar staging -# 设置 jobs Maven pom 版本环境变量 - name: Set Release version env variable run: | echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - name: "Build & test" run: | echo "done!" -# 上传文件并发布 Release - - uses: "marvinpinto/action-automatic-releases@latest" + - name: "Release" + uses: https://gitea.com/actions/release-action@main with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "${{ env.RELEASE_VERSION }}" - prerelease: false - title: "Release ${{ env.RELEASE_VERSION }}" - files: | + files: |- staging/*.jar + api_key: '${{secrets.RELEASE_TOKEN}}' \ No newline at end of file