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

fix(cli): Run npm ci in sdk folder before deploying to npm #6986

Merged
merged 9 commits into from
Feb 11, 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
22 changes: 15 additions & 7 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'cli/**'
- '.github/workflows/cli.yml'
paths:
- "cli/**"
- ".github/workflows/cli.yml"
pull_request:
branches: [main]
paths:
- 'cli/**'
- '.github/workflows/cli.yml'
paths:
- "cli/**"
- ".github/workflows/cli.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -34,7 +34,12 @@ jobs:
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Prepare SDK
run: npm ci --prefix ../open-api/typescript-sdk/
- name: Build SDK
run: npm run build --prefix ../open-api/typescript-sdk/
- run: npm ci
- run: npm run build
- run: npm publish
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
Expand Down Expand Up @@ -62,7 +67,7 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get package version
id: package-version
run: |
Expand All @@ -73,10 +78,13 @@ jobs:
id: metadata
uses: docker/metadata-action@v5
with:
flavor: |
latest=false
jrasm91 marked this conversation as resolved.
Show resolved Hide resolved
images: |
name=ghcr.io/${{ github.repository_owner }}/immich-cli
tags: |
type=raw,value=${{ steps.package-version.outputs.version }},enable=${{ github.event_name == 'workflow_dispatch' }}
type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }}

- name: Build and push image
uses: docker/build-push-action@v5.1.0
Expand Down
6 changes: 3 additions & 3 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@immich/cli",
"version": "2.0.7",
"version": "2.0.8",
"description": "Command Line Interface (CLI) for Immich",
"type": "module",
"exports": "./dist/index.js",
"bin": {
"immich": "./dist/index.js"
"immich": "dist/index.js"
},
"license": "MIT",
"keywords": [
Expand Down Expand Up @@ -51,7 +51,7 @@
},
"repository": {
"type": "git",
"url": "github:immich-app/immich",
"url": "git+https://github.com/immich-app/immich.git",
"directory": "cli"
},
"engines": {
Expand Down
Loading