From f0283f51f225b8218fa7ef59fa11a27eb4717128 Mon Sep 17 00:00:00 2001 From: Mo Date: Fri, 24 Jun 2022 07:52:07 -0500 Subject: [PATCH] chore(workflow): snjs upgrades --- .github/workflows/snjs.upgrade.event.yml | 45 ++++++++++++++++++++++++ package.json | 2 +- packages/mobile/package.json | 3 +- packages/web/package.json | 3 +- 4 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/snjs.upgrade.event.yml diff --git a/.github/workflows/snjs.upgrade.event.yml b/.github/workflows/snjs.upgrade.event.yml new file mode 100644 index 000000000..751aafd2e --- /dev/null +++ b/.github/workflows/snjs.upgrade.event.yml @@ -0,0 +1,45 @@ +name: Update SNJS Packages + +on: + workflow_dispatch: + repository_dispatch: + types: [snjs-updated-event] + +jobs: + SNJSUpdateEvent: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: main + token: ${{ secrets.CI_PAT_TOKEN }} + fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + registry-url: 'https://registry.npmjs.org' + - name: Setup git config + run: | + git config --global user.name "standardci" + git config --global user.email "ci@standardnotes.com" + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v4 + with: + gpg_private_key: ${{ secrets.CI_GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.CI_GPG_PASSPHRASE }} + git_user_signingkey: true + git_commit_gpgsign: true + + - run: yarn install + - run: | + yarn upgrade:snjs + yarn install --no-immutable + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + title: "${{ 'chore(deps): upgrade snjs' }}" + commit-message: "${{ 'chore(deps): upgrade snjs' }}" + delete-branch: true + committer: standardci + author: standardci \ No newline at end of file diff --git a/package.json b/package.json index d6eafddc3..5a7cac521 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "version": "yarn install --no-immutable && git add yarn.lock", "postversion": "./scripts/push-tags-one-by-one.sh", "lerna:list": " yarn lerna list -all", - "upgrade:snjs": "ncu -u '@standardnotes/*' && yarn workspaces foreach --verbose run ncu -u '@standardnotes/*'" + "upgrade:snjs": "ncu -u '@standardnotes/*' && yarn workspaces foreach --verbose run upgrade:snjs" }, "resolutions": { "@types/styled-components/@types/react": "17.0.2", diff --git a/packages/mobile/package.json b/packages/mobile/package.json index c0ccf97b5..33832faed 100644 --- a/packages/mobile/package.json +++ b/packages/mobile/package.json @@ -20,7 +20,8 @@ "tsc": "tsc --noEmit", "start": "react-native start", "install:pods": "yarn pod-install ios", - "android:bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/" + "android:bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/", + "upgrade:snjs": "ncu -u '@standardnotes/*'" }, "installConfig": { "hoistingLimits": "workspaces" diff --git a/packages/web/package.json b/packages/web/package.json index 86b7eaec1..7ffc8f27b 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -17,7 +17,8 @@ "lint": "eslint src/javascripts", "tsc": "tsc --project tsconfig.json", "test": "jest --config jest.config.js --coverage", - "postinstall": "yarn run ncu -loglevel verbose --packageFile package.json" + "postinstall": "yarn run ncu -loglevel verbose --packageFile package.json", + "upgrade:snjs": "ncu -u '@standardnotes/*'" }, "devDependencies": { "@babel/core": "^7.17.9",