-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 2.03 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Release
on:
release:
types:
- published
env:
GENERATE_SOURCEMAP: true
VITE_APP_API_URL: ${{ secrets.REACT_APP_API_URL }}
VITE_APP_SENTRY_DSN: ${{ secrets.REACT_APP_SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
jobs:
sentry_release:
name: Sentry release
runs-on: ubuntu-latest
env:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_DEPLOY_ENVIRONMENT: ${{ secrets.SENTRY_DEPLOY_ENVIRONMENT }}
steps:
- name: Checkout
uses: actions/checkout@v1.0.0
- name: Create release
run: |
# Install Sentry CLI
curl -sL https://sentry.io/get-cli/ | bash
# Create release
sentry-cli releases new "${{ github.event.release.tag_name }}"
sentry-cli releases set-commits --auto "${{ github.event.release.tag_name }}"
sentry-cli releases finalize "${{ github.event.release.tag_name }}"
# Create deploy
sentry-cli releases deploys "${{ github.event.release.tag_name }}" new -e $SENTRY_DEPLOY_ENVIRONMENT
build:
name: Build
runs-on: self-hosted
needs: sentry_release
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: nicksettler/itt-frontend:${{ github.event.release.tag_name }}
build-args: |
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
"VERSION=${{ github.event.release.tag_name }}"
"VITE_APP_API_URL=${{ secrets.REACT_APP_API_URL }}"
"VITE_APP_SENTRY_DSN=${{ secrets.REACT_APP_SENTRY_DSN }}"