Skip to content

push snapshot

push snapshot #9

Workflow file for this run

name: push snapshot
on:
workflow_dispatch:
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.1
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
mkdir staging/Windows
mkdir staging/Linux
cp ./script/server_script/Windows/*.bat staging/Windows
cp ./script/server_script/Linux/*.sh staging/Linux
cp ./脚本使用说明.txt staging/Windows
cp ./脚本使用说明.txt staging/Linux
zip -r Windows-script.zip ./staging/Windows/*
zip -r Linux-script.zip ./staging/Linux/*
rm -rf ./staging/Windows/*
rm -rf ./staging/Linux/*
- name: 收集构建文件
uses: actions/upload-artifact@v4.3.3
with:
name: ${{ steps.get_info.outputs.repository_name }}-SNAPSHOT-Build-${{ github.run_number}}
path: staging