-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (44 loc) · 1.49 KB
/
release.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
51
52
53
54
55
name: Release
on:
push:
branches:
- continuous-deployment
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm i -f
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.DAVID_NPM_TOKEN }}
run: npx semantic-release
- name: Auth Google Cloud SDK
uses: google-github-actions/auth@v2
with:
project_id: carmine-api-381920
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
project_id: carmine-api-381920
- name: Configure Docker to use gcloud as a credential helper
run: |
gcloud auth configure-docker europe-west1-docker.pkg.dev
- name: Build Docker image
id: build
run: |
VERSION=$(npx -c 'echo $npm_package_version')
echo "VERSION=$VERSION" >> $GITHUB_ENV
docker build -t europe-west1-docker.pkg.dev/carmine-api-381920/docker-repository/app-mainnet:$VERSION -f Dockerfile.mainnet .
- name: Push Docker image
run: |
docker push europe-west1-docker.pkg.dev/carmine-api-381920/docker-repository/app-mainnet:${{ env.VERSION }}