Merge branch 'dev' #53
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@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
binaries.soliditylang.org:443 | |
classic.yarnpkg.com:443 | |
github.com:443 | |
nightly.yarnpkg.com:443 | |
nodejs.org:443 | |
objects.githubusercontent.com:443 | |
registry.yarnpkg.com:443 | |
registry.npmjs.org:443 | |
54.185.253.63:443 | |
sentry.io:443 | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
- name: Set up corepack (for yarn) | |
run: | | |
corepack enable | |
corepack prepare [email protected] --activate | |
yarn set version 4.5.1 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 20.x | |
cache: yarn | |
- name: Cache node modules | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
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: Install dependencies and build | |
run: | | |
. web/.env.mainnet-neo.public | |
yarn build:web:ci | |
- 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@v1 | |
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 | |