File tree 2 files changed +23
-5
lines changed 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 38
38
- name : 🛠️ Build packages
39
39
run : pnpm build:packages
40
40
41
+ - name : 🕵️♂️ Check if version exists on npm
42
+ id : check_version
43
+ run : |
44
+ VERSION=$(jq -r '.version' packages/nestjs-yookassa/package.json)
45
+ echo "Current package version: $VERSION"
46
+
47
+ if npm view nestjs-yookassa@$VERSION version > /dev/null 2>&1; then
48
+ echo "Version $VERSION already exists on npm. Skipping publish."
49
+ echo "should_publish=false" >> $GITHUB_OUTPUT
50
+ else
51
+ echo "Version $VERSION does not exist. Will publish."
52
+ echo "should_publish=true" >> $GITHUB_OUTPUT
53
+ fi
54
+
41
55
- name : 🚀 Publish to NPM
56
+ if : steps.check_version.outputs.should_publish == 'true'
42
57
working-directory : packages/nestjs-yookassa
43
58
run : pnpm publish --access public
44
59
env :
Original file line number Diff line number Diff line change @@ -2,14 +2,17 @@ FROM node:20-alpine AS build
2
2
3
3
WORKDIR /app
4
4
5
- COPY package*.json ./
5
+ RUN npm install -g pnpm
6
6
7
- RUN npm install --legacy-peer-deps
7
+ COPY pnpm-lock.yaml ./
8
+ COPY package.json ./
9
+
10
+ RUN pnpm install --frozen-lockfile
8
11
9
12
COPY . .
10
13
11
- RUN npm run build
14
+ RUN pnpm run build
12
15
13
- EXPOSE 3000
16
+ EXPOSE 5000
14
17
15
- CMD ["npm " , "run" , "start" ]
18
+ CMD ["pnpm " , "run" , "start" ]
You can’t perform that action at this time.
0 commit comments