测试CI脚本
This commit is contained in:
parent
b840e61e04
commit
e00ec36725
@ -10,8 +10,6 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
# 配置权限
|
|
||||||
permissions: write-all
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -25,21 +23,16 @@ jobs:
|
|||||||
cache: maven
|
cache: maven
|
||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: mvn -B package --file pom.xml
|
run: mvn -B package --file pom.xml
|
||||||
# 将打包好的 Jar 包 放到 staging 文件夹
|
|
||||||
- run: mkdir staging && cp target/*.jar staging
|
- run: mkdir staging && cp target/*.jar staging
|
||||||
# 设置 jobs Maven pom 版本环境变量
|
|
||||||
- name: Set Release version env variable
|
- name: Set Release version env variable
|
||||||
run: |
|
run: |
|
||||||
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
|
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||||
- name: "Build & test"
|
- name: "Build & test"
|
||||||
run: |
|
run: |
|
||||||
echo "done!"
|
echo "done!"
|
||||||
# 上传文件并发布 Release
|
- name: "Release"
|
||||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
uses: https://gitea.com/actions/release-action@main
|
||||||
with:
|
with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
files: |-
|
||||||
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
|
|
||||||
prerelease: false
|
|
||||||
title: "Release ${{ env.RELEASE_VERSION }}"
|
|
||||||
files: |
|
|
||||||
staging/*.jar
|
staging/*.jar
|
||||||
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
Loading…
Reference in New Issue
Block a user