-
Notifications
You must be signed in to change notification settings - Fork 46
77 lines (66 loc) · 2.29 KB
/
sentry-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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Sentry Release
on:
workflow_dispatch:
push:
branches:
- master
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
release:
runs-on: ubuntu-latest
environment: Master
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.5.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
binaries.soliditylang.org:443
github.com:443
nodejs.org:443
registry.yarnpkg.com:443
sentry.io:443
54.185.253.63:443
- uses: actions/checkout@7739b9ba2efcda9dde65ad1e3c2dbe65b41dfba7
- name: Cache node modules
uses: actions/cache@f7ebb81a3f195b4fb88dab7c14e2f7aff52045aa
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
**/node_modules
key: |
${{ runner.os }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-
- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
with:
node-version: 16
- name: Install dependencies
run: |
yarn workspace @kleros/kleros-v2-contracts install
yarn workspace @kleros/kleros-v2-web install
- name: Build
run: |
yarn workspace @kleros/kleros-v2-contracts build
yarn workspace @kleros/kleros-v2-web build
- name: Set version
id: set-version
run: echo "version=v$(cat package.json | jq -r .version)-$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
working-directory: web
- name: Create Sentry release
uses: getsentry/action-release@4744f6a65149f441c5f396d5b0877307c0db52c7 # v1.4.1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
version: ${{ steps.set-version.outputs.version }}
sourcemaps: ./web/dist