mirror of
https://git.bjxgj.com/xgj/xgj-actions.git
synced 2025-10-14 06:33:37 +08:00
44 lines
1004 B
YAML
44 lines
1004 B
YAML
name: "基础发布流程"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
name: "发布Web项目"
|
|
|
|
steps:
|
|
- name: 检出代码
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: 设置构建环境
|
|
uses: actions/xgj/setup-env@main
|
|
with:
|
|
docker-password: ${{ secrets.DOCKER_PASSWORD }}
|
|
skip-kubectl: "true"
|
|
|
|
- name: 安装依赖
|
|
uses: actions/xgj/npm-install@main
|
|
with:
|
|
package-manager: "npm"
|
|
|
|
- name: 发布构建
|
|
id: release
|
|
uses: actions/xgj/release-web@main
|
|
with:
|
|
gitea-token: ${{ secrets.GITEA_TOKEN }}
|
|
app-env: "production"
|
|
|
|
- name: 发布结果
|
|
run: |
|
|
echo "✅ 发布完成!"
|
|
echo "📦 版本: ${{ steps.release.outputs.version }}"
|
|
echo "🐳 Docker镜像已推送到仓库"
|