diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index e5be043ab..cd6682b9f 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -38,10 +38,14 @@ jobs: npm cache verify npm ci --no-audit --prefer-offline + - name: get-npm-version + id: package-version + uses: martinbeentjes/npm-get-version-action@v1.3.1 + - name: Run NX build on shinkai-visor run: npx nx build shinkai-visor --skip-nx-cache env: - VERSION: 0.0.0.${{github.run_number}} + VERSION: ${{ steps.package-version.outputs.current-version}}.${{github.run_number}} NAME_PREFIX: '[Dev]' DESCRIPTION_PREFIX: '[Dev]' @@ -66,68 +70,69 @@ jobs: if-no-files-found: error retention-days: 5 - release-shinkai-app-android: - runs-on: ubuntu-latest - environment: development - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Use nx set shas - uses: nrwl/nx-set-shas@v3 - - - name: Setup Node version - uses: actions/setup-node@v3 - with: - node-version: 18 - check-latest: false - registry-url: https://registry.npmjs.org - cache: 'npm' - cache-dependency-path: package-lock.json - - - name: Install dependencies - run: | - npm cache verify - npm ci --no-audit --prefer-offline - - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - - name: Set mobile apps version - run: | - npx capacitor-set-version -v $VERSION -b $BUILD $APP_PATH - env: - VERSION: 0.0.0 - BUILD: ${{ github.run_number }} - APP_PATH: ./apps/shinkai-app - - - name: Mount shinkai android keystore from secret - run: | - echo $KEYSTORE_BASE_64_STRING > $KEYSTORE_BASE_64_FILE_NAME - base64 -d $KEYSTORE_BASE_64_FILE_NAME > $KEYSTORE_FILE_PATH - env: - KEYSTORE_BASE_64_STRING: ${{ secrets.ANDROID_KEYSTORE_BASE_64 }} - KEYSTORE_BASE_64_FILE_NAME: shinkai-keystore-android-upload-base-64 - KEYSTORE_FILE_PATH: ./apps/shinkai-app/android/shinkai-keystore-android - - - name: Run NX build on shinkai-app-android - run: | - npx nx build:android shinkai-app - env: - ANDROID_KEYSTORE_FILE_PATH: shinkai-keystore-android - ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }} - ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} - ANDROID_KEYSTORE_ALIAS_PASS: ${{ secrets.ANDROID_KEYSTORE_ALIAS_PASS }} - - - name: Upload signed android .AAB file to Google Play Store - uses: r0adkll/upload-google-play@v1 - with: - serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }} - packageName: com.shinkai.app - releaseFiles: ./dist/apps/shinkai-app-android/app-release-signed.aab - track: internal - status: draft + # At the moment we are not releasing android (CI was working) + # release-shinkai-app-android: + # runs-on: ubuntu-latest + # environment: development + # steps: + # - name: Check out repository + # uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + + # - name: Use nx set shas + # uses: nrwl/nx-set-shas@v3 + + # - name: Setup Node version + # uses: actions/setup-node@v3 + # with: + # node-version: 18 + # check-latest: false + # registry-url: https://registry.npmjs.org + # cache: 'npm' + # cache-dependency-path: package-lock.json + + # - name: Install dependencies + # run: | + # npm cache verify + # npm ci --no-audit --prefer-offline + + # - uses: actions/setup-java@v3 + # with: + # java-version: '17' + # distribution: 'temurin' + + # - name: Set mobile apps version + # run: | + # npx capacitor-set-version -v $VERSION -b $BUILD $APP_PATH + # env: + # VERSION: 0.0.0 + # BUILD: ${{ github.run_number }} + # APP_PATH: ./apps/shinkai-app + + # - name: Mount shinkai android keystore from secret + # run: | + # echo $KEYSTORE_BASE_64_STRING > $KEYSTORE_BASE_64_FILE_NAME + # base64 -d $KEYSTORE_BASE_64_FILE_NAME > $KEYSTORE_FILE_PATH + # env: + # KEYSTORE_BASE_64_STRING: ${{ secrets.ANDROID_KEYSTORE_BASE_64 }} + # KEYSTORE_BASE_64_FILE_NAME: shinkai-keystore-android-upload-base-64 + # KEYSTORE_FILE_PATH: ./apps/shinkai-app/android/shinkai-keystore-android + + # - name: Run NX build on shinkai-app-android + # run: | + # npx nx build:android shinkai-app + # env: + # ANDROID_KEYSTORE_FILE_PATH: shinkai-keystore-android + # ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }} + # ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} + # ANDROID_KEYSTORE_ALIAS_PASS: ${{ secrets.ANDROID_KEYSTORE_ALIAS_PASS }} + + # - name: Upload signed android .AAB file to Google Play Store + # uses: r0adkll/upload-google-play@v1 + # with: + # serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }} + # packageName: com.shinkai.app + # releaseFiles: ./dist/apps/shinkai-app-android/app-release-signed.aab + # track: internal + # status: draft diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml index 4331545cb..188c13d6a 100644 --- a/.github/workflows/release-prod.yml +++ b/.github/workflows/release-prod.yml @@ -28,6 +28,17 @@ jobs: cache: 'npm' cache-dependency-path: package-lock.json + - name: get-npm-version + id: package-version + uses: martinbeentjes/npm-get-version-action@v1.3.1 + + - name: Check version match + if: ${{ github.ref_name }} != ${{ steps.package-version.outputs.current-version }} + uses: actions/github-script@v3 + with: + script: | + core.setFailed('Version mismatch') + - name: Install dependencies run: | npm cache verify @@ -36,7 +47,7 @@ jobs: - name: Run NX build on shinkai-visor run: npx nx build shinkai-visor --skip-nx-cache env: - VERSION: ${{ github.ref_name }}.${{github.run_number}} + VERSION: ${{ steps.package-version.outputs.current-version }}.${{github.run_number}} NAME_PREFIX: '' DESCRIPTION_PREFIX: '' PUBLIC_KEY: ${{ secrets.CHROME_EXTENSION_PUBLIC_KEY }} diff --git a/apps/shinkai-visor/package-lock.json b/apps/shinkai-visor/package-lock.json deleted file mode 100644 index 8360e46e4..000000000 --- a/apps/shinkai-visor/package-lock.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "shinkai-visor", - "version": "0.0.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "shinkai-visor", - "version": "0.0.1" - } - } -} diff --git a/apps/shinkai-visor/package.json b/apps/shinkai-visor/package.json index ab681f516..70195052e 100644 --- a/apps/shinkai-visor/package.json +++ b/apps/shinkai-visor/package.json @@ -1,7 +1,6 @@ { "name": "shinkai-visor", "private": true, - "version": "0.4.5", "type": "module", "description": "Shinkai Visor", "main": "./src/service-worker/service-worker.ts" diff --git a/package-lock.json b/package-lock.json index 0cf9bfb0c..048c10a84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@shinkai/source", - "version": "0.0.0", + "version": "0.5.2", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 0dc3cb9f9..139fc4758 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shinkai/source", - "version": "0.0.0", + "version": "0.5.2", "license": "MIT", "scripts": { "postinstall": "npx patch-package"