-
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (44 loc) · 1.38 KB
/
build.yaml
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: Build Zaparoo web app
on:
push:
tags:
- "*"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Authenticate NPM registry
run: echo -e "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}\n@capawesome-team:registry=https://npm.pkg.github.com/" > ~/.npmrc
- name: Add Firebase credentials
run: echo '${{ secrets.FIREBASE_CREDS }}' > ./src/firebase.json
- name: Install dependencies
run: npm install
- name: Production build
env:
VITE_VERSION: ${{ github.ref_name }}
VITE_GOOGLE_STORE_API: ${{ secrets.VITE_GOOGLE_STORE_API }}
VITE_APPLE_STORE_API: ${{ secrets.VITE_APPLE_STORE_API }}
run: npm run build
- name: Package release tarball
if: startsWith(github.ref, 'refs/tags/')
run: tar czvf zaparoo-app.tar.gz -C ./dist .
- name: Create release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: zaparoo-app.tar.gz
fail_on_unmatched_files: true
make_latest: false
permissions:
contents: write