Skip to content

vote restart

vote restart #21

Workflow file for this run

name: pr check
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 获取信息
id: get_info
run: echo "repository_name=${GITHUB_REPOSITORY/${{ github.repository_owner }}\//}" >> $GITHUB_OUTPUT
- name: 拉取代码
uses: actions/checkout@v4.1.6
with:
submodules: true
- name: 安装java8
uses: actions/setup-java@v4.2.1
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: 构建
run: |
mvn -B package --file pom.xml
mkdir staging
cp target/*.jar staging
- name: 准备资源
run: |
pwd
cp ./script/server_script/Windows/*.bat staging
cp ./script/server_script/Linux/*.sh staging
cd ./staging
zip -r Windows-script.zip ./*.bat
zip -r Linux-script.zip ./*.sh
ls -la
cd ../
mkdir github_artifact
cp ./staging/*.zip github_artifact
cp ./staging/*.jar github_artifact
ls -la
- name: 收集构建文件
uses: actions/upload-artifact@v4.3.3
with:
name: ${{ steps.get_info.outputs.repository_name }}-PR_${{ github.event.pull_request.number }}-Build_${{ github.run_number}}
path: github_artifact