Skip to content

MMOitem Builder [Release version] #7

MMOitem Builder [Release version]

MMOitem Builder [Release version] #7

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: MMOitem Builder [Release version]
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
# 手动触发事件
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
# push:
# branches: [ "Zh_cn" ]
# pull_request:
# branches: [ "Zh_cn" ]
jobs:
build:
# 配置权限
permissions: write-all
runs-on: ubuntu-latest
steps:
# 下载代码
- uses: actions/checkout@v3
- name: Set up JDK 17
# 安装 JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: phoenixdevt-releases
- name: Install depends
run: mvn install
# Maven 打包
- name: Build with Maven
run: mvn package
# 将打包好的 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"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
prerelease: false
title: "Release ${{ env.RELEASE_VERSION }}"
files: |
staging/*.jar