Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable yarn 4 in all the workflows #63

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:

preview-frontend:
runs-on: ubuntu-latest
environment: 'Preview'
needs:
- build
steps:
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/publish-embed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-

- name: Set up Node 20
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Install Yarn 4
run: |
corepack enable
yarn set version berry

- name: Install projects dependencies
uses: bahmutov/npm-install@v1
run: yarn install

- name: Publish to NPM
working-directory: packages/embed
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/sentry-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Source maps to Sentry
name: Release Sourcemaps to Sentry
on:
push:
branches:
Expand All @@ -12,16 +12,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-

- name: Set up Node 20
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install Yarn 4
run: |
corepack enable
yarn set version berry

- name: Install projects dependencies
uses: bahmutov/npm-install@v1
run: yarn install

- name: Generate sourcemaps from build
run: yarn build:prod --filter=@snipcode/core
run: yarn build:prod --filter=...@snipcode/core

- name: Create a Sentry release
env:
Expand Down
8 changes: 5 additions & 3 deletions apps/core/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM node:18-buster as builder
FROM node:20-buster as builder

RUN mkdir app

WORKDIR /app

COPY . .

RUN corepack enable && yarn set version berry

RUN yarn install

RUN npx prisma generate --schema=./packages/database/prisma/schema.prisma
Expand All @@ -14,7 +16,7 @@ WORKDIR /app/apps/core

RUN yarn build:prod

FROM node:18-alpine as schema-builder
FROM node:20-alpine as schema-builder

WORKDIR /app

Expand All @@ -24,7 +26,7 @@ COPY --chown=node:node --from=builder /app/packages/database/prisma/schema.prism
RUN npx prisma generate --schema=./app/prisma/schema.prisma


FROM node:18-alpine AS snipcode
FROM node:20-alpine AS snipcode

ENV NODE_ENV=production

Expand Down