From 4bd61adc5bdf4a2f4475d7f4ab69391639b08596 Mon Sep 17 00:00:00 2001 From: Mo Date: Tue, 14 Jun 2022 10:50:08 -0500 Subject: [PATCH] chore: release after tag push --- .github/workflows/components.publish.yml | 7 ++---- .github/workflows/desktop.release.beta.yml | 5 ++--- .github/workflows/desktop.release.prod.yml | 5 ++--- .github/workflows/mobile.build-dev.yml | 8 ++----- .github/workflows/mobile.build-prod.yml | 8 ++++--- .github/workflows/version-bump.yml | 26 ++++++++++++++++++++++ .github/workflows/web.beta.yml | 2 -- .github/workflows/web.dev.yml | 11 +++------ .github/workflows/web.prod.yml | 10 +++------ .release-please-manifest.json | 5 ----- package.json | 3 +-- packages/components/package.json | 5 ++--- packages/web-server/package.json | 2 +- release-please-config.json | 14 ------------ yarn.lock | 20 ++++++++--------- 15 files changed, 59 insertions(+), 72 deletions(-) create mode 100644 .github/workflows/version-bump.yml delete mode 100644 .release-please-manifest.json delete mode 100644 release-please-config.json diff --git a/.github/workflows/components.publish.yml b/.github/workflows/components.publish.yml index f8596d04e..4103d2160 100644 --- a/.github/workflows/components.publish.yml +++ b/.github/workflows/components.publish.yml @@ -2,15 +2,12 @@ name: Components Publish on: push: - branches: [ develop, main ] - paths: - - packages/components/** + tags: + - '@standardnotes/components@*' workflow_dispatch: jobs: publish: - if: contains(github.event.head_commit.message, 'chore(release)') == false - runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/desktop.release.beta.yml b/.github/workflows/desktop.release.beta.yml index 36d4654db..0ce7f89e1 100644 --- a/.github/workflows/desktop.release.beta.yml +++ b/.github/workflows/desktop.release.beta.yml @@ -2,9 +2,8 @@ name: Desktop Beta Release on: push: - branches: [ develop ] - paths: - - packages/desktop/** + tags: + - '@standardnotes/desktop@*' workflow_dispatch: jobs: diff --git a/.github/workflows/desktop.release.prod.yml b/.github/workflows/desktop.release.prod.yml index 33bcf81f1..0f54819fb 100644 --- a/.github/workflows/desktop.release.prod.yml +++ b/.github/workflows/desktop.release.prod.yml @@ -2,9 +2,8 @@ name: Desktop Prod Release on: push: - branches: [ main ] - paths: - - packages/desktop/** + tags: + - '@standardnotes/desktop@*' workflow_dispatch: jobs: diff --git a/.github/workflows/mobile.build-dev.yml b/.github/workflows/mobile.build-dev.yml index 7d24b0284..d58121cd5 100644 --- a/.github/workflows/mobile.build-dev.yml +++ b/.github/workflows/mobile.build-dev.yml @@ -2,15 +2,12 @@ name: Mobile Build Development on: push: - branches: - - develop - paths: - - packages/mobile/** + tags: + - '@standardnotes/mobile@*' workflow_dispatch: jobs: android: - if: contains(github.event.head_commit.message, 'chore(release)') == false defaults: run: working-directory: packages/mobile @@ -50,7 +47,6 @@ jobs: name: dev.apk path: android/app/build/outputs/apk/dev/release/app-dev-release.apk ios: - if: contains(github.event.head_commit.message, 'chore(release)') == false defaults: run: working-directory: packages/mobile diff --git a/.github/workflows/mobile.build-prod.yml b/.github/workflows/mobile.build-prod.yml index 3f7e8d986..ed98dc8f8 100644 --- a/.github/workflows/mobile.build-prod.yml +++ b/.github/workflows/mobile.build-prod.yml @@ -1,10 +1,13 @@ name: Mobile Build Production -on: [workflow_dispatch] +on: + push: + tags: + - '@standardnotes/mobile@*' + workflow_dispatch: jobs: android: - if: contains(github.event.head_commit.message, 'chore(release)') == false defaults: run: working-directory: packages/mobile @@ -49,7 +52,6 @@ jobs: name: release.aab path: android/app/build/outputs/bundle/prodRelease/app-prod-release.aab ios: - if: contains(github.event.head_commit.message, 'chore(release)') == false defaults: run: working-directory: packages/mobile diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml new file mode 100644 index 000000000..7644962e5 --- /dev/null +++ b/.github/workflows/version-bump.yml @@ -0,0 +1,26 @@ +name: Version Bump + +on: + push: + branches: [ develop, main ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + - name: Install dependencies + run: yarn install + - name: ESLint + run: yarn lint + - name: Build + run: yarn build + - name: Test + run: yarn test + - name: Bump Version + run: yarn release diff --git a/.github/workflows/web.beta.yml b/.github/workflows/web.beta.yml index ccdd8d6de..93e064df4 100644 --- a/.github/workflows/web.beta.yml +++ b/.github/workflows/web.beta.yml @@ -10,7 +10,6 @@ on: jobs: test: - if: contains(github.event.head_commit.message, 'chore(release)') == false runs-on: ubuntu-latest steps: - name: Checkout code @@ -27,7 +26,6 @@ jobs: run: yarn test deploy: - if: contains(github.event.head_commit.message, 'chore(release)') == false runs-on: ubuntu-latest needs: test diff --git a/.github/workflows/web.dev.yml b/.github/workflows/web.dev.yml index d87910f87..bdd541503 100644 --- a/.github/workflows/web.dev.yml +++ b/.github/workflows/web.dev.yml @@ -6,15 +6,13 @@ concurrency: on: push: - branches: [ develop ] - paths: - - packages/web-server/** - - packages/web/** + tags: + - '@standardnotes/web@*' + - '@standardnotes/web-server@*' workflow_dispatch: jobs: test: - if: contains(github.event.head_commit.message, 'chore(release)') == false runs-on: ubuntu-latest steps: - name: Checkout code @@ -32,8 +30,6 @@ jobs: deploy: - if: contains(github.event.head_commit.message, 'chore(release)') == false - runs-on: ubuntu-latest needs: test @@ -80,7 +76,6 @@ jobs: wait-for-service-stability: true notify_discord: - if: contains(github.event.head_commit.message, 'chore(release)') == false needs: deploy runs-on: ubuntu-latest diff --git a/.github/workflows/web.prod.yml b/.github/workflows/web.prod.yml index 9a83f5cd2..cab31ea48 100644 --- a/.github/workflows/web.prod.yml +++ b/.github/workflows/web.prod.yml @@ -6,14 +6,12 @@ concurrency: on: push: - branches: [ main ] - paths: - - packages/web-server/** - - packages/web/** + tags: + - '@standardnotes/web@*' + - '@standardnotes/web-server@*' jobs: test: - if: contains(github.event.head_commit.message, 'chore(release)') == false runs-on: ubuntu-latest steps: - name: Checkout code @@ -30,7 +28,6 @@ jobs: run: yarn test deploy: - if: contains(github.event.head_commit.message, 'chore(release)') == false runs-on: ubuntu-latest needs: test @@ -77,7 +74,6 @@ jobs: wait-for-service-stability: true notify_discord: - if: contains(github.event.head_commit.message, 'chore(release)') == false needs: deploy runs-on: ubuntu-latest diff --git a/.release-please-manifest.json b/.release-please-manifest.json deleted file mode 100644 index c54a8d59f..000000000 --- a/.release-please-manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "packages/mobile": "3.22.0", - "packages/desktop": "3.22.1", - "packages/web": "3.22.1" -} \ No newline at end of file diff --git a/package.json b/package.json index 6273ac1b0..008a94001 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,7 @@ "start:server:web:localhost": "lerna run start:no-binding --scope=@standardnotes/web-server", "prepare": "husky install", "reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock", - "release": "yarn workspaces foreach run release", - "version-bump": "lerna version --conventional-commits --yes -m \"chore(release): publish\"" + "release": "lerna version --conventional-commits --yes -m \"chore(release): publish\"" }, "resolutions": { "@types/styled-components/@types/react": "17.0.2", diff --git a/packages/components/package.json b/packages/components/package.json index fda105c00..843dff9f5 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,5 +1,5 @@ { - "name": "@standardnotes/components-meta", + "name": "@standardnotes/components", "version": "0.2.0", "private": true, "workspaces": { @@ -9,8 +9,7 @@ }, "scripts": { "build": "echo BUILDING COMPONENTS && yarn workspaces foreach --parallel run build", - "lint": "yarn workspaces foreach --parallel run lint", - "version": "node scripts/package-components.mjs && git add dist && git commit -m 'chore(release): components'" + "lint": "yarn workspaces foreach --parallel run lint" }, "devDependencies": { "@standardnotes/deterministic-zip": "^1.2.0", diff --git a/packages/web-server/package.json b/packages/web-server/package.json index 4f2abaa06..014bf1e66 100644 --- a/packages/web-server/package.json +++ b/packages/web-server/package.json @@ -16,7 +16,7 @@ "build:server:all": "yarn workspaces foreach -ptR run build" }, "dependencies": { - "@standardnotes/components-meta": "workspace:*", + "@standardnotes/components": "workspace:*", "@standardnotes/web": "workspace:*" } } diff --git a/release-please-config.json b/release-please-config.json deleted file mode 100644 index 5d8a05abc..000000000 --- a/release-please-config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "bootstrap-sha": "1cfe0de787ed8b7f84e70d68a64927da6a21c62d", - "commit-search-depth": 100, - "plugins": ["node-workspace"], - "packages": { - "packages/desktop": {}, - "packages/web": {}, - "packages/mobile": {}, - "packages/components-meta": {}, - "packages/icons": {}, - "packages/toast": {}, - "packages/styles": {} - } -} diff --git a/yarn.lock b/yarn.lock index 087a84a57..ea5cbcc1b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4950,9 +4950,16 @@ __metadata: languageName: node linkType: hard -"@standardnotes/components-meta@workspace:*, @standardnotes/components-meta@workspace:packages/components": +"@standardnotes/components@npm:1.9.1, @standardnotes/components@npm:^1.9.1": + version: 1.9.1 + resolution: "@standardnotes/components@npm:1.9.1" + checksum: 32c2dbb0295086f6ef77092c4a316f3af077c400598520240ae00c51d752ad59e45bc082013e1a070662b17882487c054c8f2f491179c41de5cbd5b90797b16f + languageName: node + linkType: hard + +"@standardnotes/components@workspace:*, @standardnotes/components@workspace:packages/components": version: 0.0.0-use.local - resolution: "@standardnotes/components-meta@workspace:packages/components" + resolution: "@standardnotes/components@workspace:packages/components" dependencies: "@standardnotes/deterministic-zip": ^1.2.0 "@standardnotes/features": ^1.45.1 @@ -4964,13 +4971,6 @@ __metadata: languageName: unknown linkType: soft -"@standardnotes/components@npm:1.9.1, @standardnotes/components@npm:^1.9.1": - version: 1.9.1 - resolution: "@standardnotes/components@npm:1.9.1" - checksum: 32c2dbb0295086f6ef77092c4a316f3af077c400598520240ae00c51d752ad59e45bc082013e1a070662b17882487c054c8f2f491179c41de5cbd5b90797b16f - languageName: node - linkType: hard - "@standardnotes/config@npm:^2.4.3": version: 2.4.3 resolution: "@standardnotes/config@npm:2.4.3" @@ -5586,7 +5586,7 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/web-server@workspace:packages/web-server" dependencies: - "@standardnotes/components-meta": "workspace:*" + "@standardnotes/components": "workspace:*" "@standardnotes/web": "workspace:*" languageName: unknown linkType: soft