High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat(cli): auto-release (#10127)
Jason Rasmussen735455508cd4
diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.ymlindex ceb666c67d..512f716f98 100644--- a/.github/workflows/cli.yml+++ b/.github/workflows/cli.yml@@ -1,16 +1,17 @@name: CLI Buildon:- workflow_dispatch:push:branches: [main]paths:- - "cli/**"- - ".github/workflows/cli.yml"+ - 'cli/**'+ - '.github/workflows/cli.yml'pull_request:branches: [main]paths:- - "cli/**"- - ".github/workflows/cli.yml"+ - 'cli/**'+ - '.github/workflows/cli.yml'+ release:+ types: [published]concurrency:group: ${{ github.workflow }}-${{ github.ref }}@@ -32,8 +33,8 @@ jobs:# Setup .npmrc file to publish to npm- uses: actions/setup-node@v4with:- node-version: "20.x"- registry-url: "https://registry.npmjs.org"+ node-version: '20.x'+ registry-url: 'https://registry.npmjs.org'- name: Prepare SDKrun: npm ci --prefix ../open-api/typescript-sdk/- name: Build SDK@@ -41,7 +42,7 @@ jobs:- run: npm ci- run: npm run build- run: npm publish- if: ${{ github.event_name == 'workflow_dispatch' }}+ if: ${{ github.event_name == 'release' }}env:NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}@@ -83,15 +84,15 @@ jobs:images: |name=ghcr.io/${{ github.repository_owner }}/immich-clitags: |- type=raw,value=${{ steps.package-version.outputs.version }},enable=${{ github.event_name == 'workflow_dispatch' }}- type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }}+ type=raw,value=${{ steps.package-version.outputs.version }},enable=${{ github.event_name == 'release' }}+ type=raw,value=latest,enable=${{ github.event_name == 'release' }}- name: Build and push imageuses: docker/[email protected]with:file: cli/Dockerfileplatforms: linux/amd64,linux/arm64- push: ${{ github.event_name == 'workflow_dispatch' }}+ push: ${{ github.event_name == 'release' }}cache-from: type=ghacache-to: type=gha,mode=maxtags: ${{ steps.metadata.outputs.tags }}diff --git a/misc/release/pump-version.sh b/misc/release/pump-version.shindex 81c9cbabb3..b90d265bf9 100755--- a/misc/release/pump-version.sh+++ b/misc/release/pump-version.sh@@ -66,10 +66,12 @@ if [ "$CURRENT_SERVER" != "$NEXT_SERVER" ]; thennpm --prefix server run buildmake open-apinpm --prefix open-api/typescript-sdk version "$SERVER_PUMP"+ # TODO use $SERVER_PUMP once we pass 2.2.x+ npm --prefix cli version patch+ npm --prefix cli i --package-lock-onlynpm --prefix web version "$SERVER_PUMP"- npm --prefix e2e version "$SERVER_PUMP"npm --prefix web i --package-lock-only- npm --prefix cli i --package-lock-only+ npm --prefix e2e version "$SERVER_PUMP"npm --prefix e2e i --package-lock-onlypoetry --directory machine-learning version "$SERVER_PUMP"fi