Merge branch 'master' into dev #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@cba0d00b1fc9a034e1e642ea0f1103c282990604 # 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 | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- name: Cache node modules | |
uses: actions/cache@67b839edb68371cc5014f6cea11c9aa77238de78 | |
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@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c | |
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 | |