-
Notifications
You must be signed in to change notification settings - Fork 21
62 lines (55 loc) · 1.51 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
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@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- run: npm ci
- run: npm i rollup
- name: Optimize SVGs in public/images/facilities
working-directory: public/images/facilities
run: |
npm i -g svgo
svgo -v
svgo -f ./ --pretty --indent 2 --config ./svgo.config.js
# changes should be made before build.sh as they will be committed in build.sh
- name: Build
id: build
run: ./scripts/build.sh
shell: bash
env:
BUMP_VERSION: ${{ inputs.bump_version }}
- name: Release
if: ${{ inputs.auto_deploy == 'UAT' || inputs.auto_deploy == 'PRD' }}
uses: railmapgen/releaser@main
with:
app_name: rmp
version: ${{ steps.build.outputs.RMG_VER }}
environment: ${{ inputs.auto_deploy }}
dist: dist
github_token: ${{ secrets.RMG_BUILD_AND_RELEASE }}
gitlab_token: ${{ secrets.GITLAB_RELEASE }}