-
-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (48 loc) · 1.4 KB
/
release-next.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
name: Release Next
on:
workflow_dispatch:
inputs:
branch:
description: 'The source branch to build. Default main.'
default: main
required: true
releaseBranch:
description: 'The release branch to commit to. Default next.'
default: next
required: true
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
- name: Install
run: npm install --prefer-offline
- name: Lint
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Build
run: npm run build
- name: Test
run: npm test
- name: Remove dev dependencies
run: npm install --omit dev --prefer-offline
- name: Commit
uses: endbug/add-and-commit@45a4ede867982d5d85997a82529b1d9dd0328e7f
with:
add: 'build node_modules --force'
branch: ${{ github.event.inputs.releaseBranch }}
message: 'Add build output'
pull: 'NO-PULL'
push: 'origin ${{ github.event.inputs.releaseBranch }} --force'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Reinstall dev dependencies
run: npm install --prefer-offline