generated from railmapgen/seed-project
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (57 loc) · 1.49 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build and Release
on:
workflow_dispatch:
inputs:
auto_deploy:
type: choice
description: Auto deploy to (NONE/UAT/PRD)
options:
- PRD
- UAT
- NONE
default: NONE
required: true
bump_version:
type: choice
description: Bump version
options:
- patch
- minor
- major
default: patch
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '20'
- run: npm ci
- name: Build
id: build
run: ./scripts/build.sh
shell: bash
env:
BUMP_VERSION: ${{ inputs.bump_version }}
# - name: Release
# id: release
# run: ./scripts/release.sh
# shell: bash
# env:
# VERSION: ${{ steps.build.outputs.RMG_VER }}
# ENV: ${{ inputs.auto_deploy }}
- name: Release
if: ${{ inputs.auto_deploy == 'UAT' || inputs.auto_deploy == 'PRD' }}
uses: railmapgen/releaser@main
with:
app_name: rmp-designer
version: ${{ steps.build.outputs.RMG_VER }}
environment: ${{ inputs.auto_deploy }}
dist: dist
github_token: ${{ secrets.RMG_BUILD_AND_RELEASE }}
gitlab_token: ${{ secrets.GITLAB_RELEASE }}
gitee_token: ${{ secrets.GITEE_RELEASE }}