-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (61 loc) · 2.02 KB
/
develop.yml
File metadata and controls
76 lines (61 loc) · 2.02 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
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
name: On push develop
on:
push:
branches:
- develop
jobs:
build_and_deploy:
name: Build and deploy to staging
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node 14
uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://npm.pkg.github.com'
- name: NPM cache
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Dependencies
run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Test Dependencies
run: docker-compose up -d
- name: Tests
run: npm test
- name: Retrieve version
run: echo "RELEASE=$(cat package.json|jq -r '.version')" >> $GITHUB_ENV
- name: Build Project
run: npm run build
- name: Dot env
run: cp config/.staging.env ./dist/.env
# - name: Deploy to Firebase
# uses: w9jds/firebase-action@master
# with:
# args: deploy --force
# env:
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
# PROJECT_ID: staging
- name: Publish release
run: npx release-it --preRelease=develop
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}