测试CI脚本

This commit is contained in:
zhangyuheng 2023-12-07 10:52:38 +08:00
parent b840e61e04
commit e00ec36725

View File

@ -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}}'