From 93c004a48c45c98962c52fe56941614cfd674c71 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 20 Apr 2022 16:11:06 +0100 Subject: [PATCH] Add pro release to release-develop --- .github/workflows/budibase_ci.yml | 15 ++++---- .github/workflows/release-develop.yml | 50 +++++++++++++++++++++------ package.json | 1 - 3 files changed, 46 insertions(+), 20 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 96d1dd9e36..d931277674 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -26,23 +26,22 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Checkout budibase-pro + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + # Add @budibase/pro to filesystem + - name: Checkout pro uses: actions/checkout@v2 with: repository: budibase/budibase-pro ref: ${{ env.branch }} path: './pro' token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - - # Can't checkout in the parent directory directly - # Just do a move afterwards instead - name: Setup pro run: mv pro ../budibase-pro && cd ../budibase-pro && yarn setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - run: yarn - run: yarn bootstrap - run: yarn lint diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index 4467cd6c81..1def30df31 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -4,6 +4,7 @@ on: push: branches: - develop + - feature/licensing paths: - '.aws/**' - '.github/**' @@ -29,6 +30,18 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 14.x + + # Add @budibase/pro to filesystem + - name: Checkout pro + uses: actions/checkout@v2 + with: + repository: budibase/budibase-pro + ref: ${{ env.branch }} + path: './pro' + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + - name: Setup pro + run: mv pro ../budibase-pro && cd ../budibase-pro && yarn setup + - run: yarn - run: yarn bootstrap - run: yarn lint @@ -42,21 +55,36 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: eu-west-1 - - name: Publish budibase packages to NPM + # - name: Publish budibase packages to NPM + # env: + # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + # run: | + # # setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default + # git config user.name "Budibase Staging Release Bot" + # git config user.email "<>" + # echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc + # yarn release:develop + + - name: 'Get Previous tag' + id: previoustag + uses: "WyriHaximus/github-action-get-previous-tag@v1" + + - name: Publish @budibase/pro package to NPM env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + VERSION: ${{ steps.previoustag.outputs.tag }} run: | - # setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default git config user.name "Budibase Staging Release Bot" git config user.email "<>" + cd ../budibase-pro echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc - yarn release:develop + yarn release:develop $VERSION - - name: Build/release Docker images - run: | - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD - yarn build - yarn build:docker:develop - env: - DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} + # - name: Build/release Docker images + # run: | + # docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + # yarn build + # yarn build:docker:develop + # env: + # DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} + # DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} diff --git a/package.json b/package.json index cdded06773..953c4bcd76 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "setup": "node ./hosting/scripts/setup.js && yarn && yarn bootstrap && yarn build && yarn dev", "bootstrap": "lerna link && lerna bootstrap && ./scripts/link-dependencies.sh", "build": "lerna run build", - "publishnpm": "yarn build && lerna publish --force-publish", "release": "lerna publish patch --yes --force-publish", "release:develop": "lerna publish prerelease --yes --force-publish --dist-tag develop", "restore": "yarn run clean && yarn run bootstrap && yarn run build",