-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (78 loc) · 2.62 KB
/
build-release.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Build and package releases
on:
release:
types: [created,edited]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js 20.5.1
uses: actions/setup-node@v4
with:
node-version: 20.5.1
- name: Install dependencies
run: npm install
- name: "Clean: Staging"
run: rm -rf build
- name: "Build: Staging"
run: npm run build
env:
CI: false
REACT_APP_LOGIN_BASE_URL: https://search-staging.www.lib.umich.edu
REACT_APP_SPECTRUM_BASE_URL: https://search-staging.www.lib.umich.edu/spectrum
- name: "Package: Staging"
run: tar -C build --transform s/./search/ -czf search-staging.tar.gz .
- name: "Upload Release Asset: Staging"
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: search-staging.tar.gz
- name: "Clean: Production"
run: rm -rf build
- name: "Build: Production"
run: npm run build
env:
CI: false
REACT_APP_LOGIN_BASE_URL: https://search.lib.umich.edu
REACT_APP_SPECTRUM_BASE_URL: https://search.lib.umich.edu/spectrum
- name: "Package: Production"
run: tar -C build --transform s/./search/ -czf search-production.tar.gz .
- name: "Upload Release Asset: Production"
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: search-production.tar.gz
- name: "Clean: Local"
run: rm -rf build
- name: "Build: Local"
run: npm run build
env:
CI: false
REACT_APP_LOGIN_BASE_URL: http://127.0.0.1:3000
REACT_APP_SPECTRUM_BASE_URL: http://127.0.0.1:3000/spectrum
- name: "Package: Local"
run: tar -C build --transform s/./search/ -czf search-local.tar.gz .
- name: "Upload Release Asset: Local"
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: search-local.tar.gz
- name: "Clean: Origin"
run: rm -rf build
- name: "Build: Origin"
run: npm run build
env:
CI: false
- name: "Package: Origin"
run: tar -C build --transform s/./search/ -czf search-origin.tar.gz .
- name: "Upload Release Asset: Origin"
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: search-origin.tar.gz