Skip to content

Commit 62bae40

Browse files
committed
Add artifacts
1 parent 5c39b29 commit 62bae40

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/push.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,59 @@ jobs:
99
defaults:
1010
run:
1111
working-directory: app
12+
1213
steps:
1314
- uses: actions/checkout@v2
15+
1416
- name: Setup Node
1517
uses: actions/setup-node@v1
1618
with:
1719
node-version: 12
20+
1821
- name: Install dependencies
1922
run: npm ci
23+
2024
- name: Build App
2125
run: npm run build --if-present
2226
env:
2327
CI: true
2428

29+
- name: Publish Artifact
30+
uses: actions/upload-artifact@v1
31+
with:
32+
name: app-dist
33+
path: dist
34+
2535
release:
2636
if: startsWith(github.ref, 'refs/tags/v')
2737
needs:
2838
- build
39+
2940
name: Release
3041
runs-on: ubuntu-latest
3142
defaults:
3243
run:
3344
working-directory: app
45+
3446
steps:
47+
- name: Download Artifact
48+
uses: actions/download-artifact@v1
49+
with:
50+
name: app-dist
51+
path: dist
52+
3553
- name: Get version number
3654
uses: olegtarasov/get-tag@v2
55+
3756
- name: Add distribution files
3857
run: git add dist
58+
3959
- name: Commit files
4060
run: |
4161
git config --local user.email "action@github.com"
4262
git config --local user.name "GitHub Action"
4363
git commit -m "Release new version $GIT_TAG_NAME"
64+
4465
- name: Push changes
4566
uses: ad-m/github-push-action@master
4667
with:

0 commit comments

Comments
 (0)