-
-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (38 loc) · 1.41 KB
/
build-sth.yml
File metadata and controls
50 lines (38 loc) · 1.41 KB
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
name: Build STH Packages
on:
workflow_call:
inputs:
node-version:
required: false
default: '18.x'
type: string
jobs:
build-sth:
name: Build STH Packages Nodejs ${{ inputs.node-version }}
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Setup Nodejs ${{ inputs.node-version }}
uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: ${{ inputs.node-version }}
- name: Install dependencies
run: yarn install --ignore-engines --frozen-lockfile --prefer-offline --silent
- name: Update saved git hash
run: yarn savehash
- name: Build packages
run: yarn build:packages
- name: List dirs in dist
run: find dist -maxdepth 2 -type d
- name: Install pigz
run: sudo apt-get install pigz -y
- name: Create artifact
run: tar --use-compress-program="pigz --best --recursive" -cf dist-sth-${{ github.event.pull_request.head.sha }}-${{ inputs.node-version }}.tar.gz dist/.
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: dist-sth-${{ github.event.pull_request.head.sha }}-${{ inputs.node-version }}.tar.gz
path: dist-sth-${{ github.event.pull_request.head.sha }}-${{ inputs.node-version }}.tar.gz
retention-days: 1