Files
JayuCloud/.gitea/workflows/salon-prod-prepare.yml
T
xiaowang b0181edbd3
发布 Nacos 配置 / publish (push) Successful in 37s
修复Gitea合并提交构建失败
2026-08-28 13:07:49 +08:00

47 lines
1.3 KiB
YAML

name: Salon 生产发布准备
on:
pull_request:
types:
- closed
branches:
- prod
jobs:
prepare:
if: >-
github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'prod' &&
github.event.pull_request.head.ref == 'sit'
runs-on: jayucloud
env:
GITHUB_REF_NAME: prod
steps:
- name: 检出合并提交
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: 0
- name: 检查构建工具链
shell: bash
run: |
set -euo pipefail
java -version 2>&1 | grep -q '17\.'
node --version | grep -q '^v20\.'
mvn --version > "$RUNNER_TEMP/maven-version.txt"
grep -q 'Java version: 17\.' "$RUNNER_TEMP/maven-version.txt"
pwsh --version
- name: 构建 Salon 发布包
shell: pwsh
run: >-
./docs/scripts/deploy-jayucloud-salon-production.ps1
-PackageOnly
-SkipDatabaseInit
- name: 上传发布包
uses: actions/upload-artifact@v4
with:
name: salon-prod-${{ github.event.pull_request.merge_commit_sha }}
path: artifacts/release/*
if-no-files-found: error
retention-days: 30