generated from railmapgen/seed-project
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.13 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
name: Build
on:
workflow_dispatch:
inputs:
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
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: Build
id: build
run: ./scripts/build.sh
shell: bash
env:
BUMP_VERSION: ${{ inputs.bump_version }}
- name: Publish
if: ${{ github.ref == 'refs/heads/main' }}
run: |
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.RMG_NPM_PUBLISH }}
- name: Release
uses: railmapgen/releaser@main
with:
app_name: rmg-runtime
version: ${{ steps.build.outputs.RMG_VER }}
environment: PRD
dist: docs
github_token: ${{ secrets.RMG_BUILD_AND_RELEASE }}
gitlab_token: ${{ secrets.GITLAB_RELEASE }}