forked from trussworks/react-uswds
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 912 Bytes
/
package-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
name: Package release
on:
pull_request:
types:
- closed
branches:
- main
jobs:
package-release:
runs-on: ubuntu-latest
if: |
startsWith(github.head_ref, 'release-')
&& github.event.pull_request.merged
steps:
- name: Checkout out repository
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'yarn'
# The yarn cache is not node_modules
- name: Install Dependencies
run: yarn --prefer-offline
- name: Run tests
run: yarn test
- name: Package library
run: yarn pack
- name: Upload package
uses: actions/upload-artifact@v2
with:
path: trussworks-react-uswds-v*.*.*.tgz
if-no-files-found: error
retention-days: 5