From e4a8316c9dd8c12cd7b49c972b0947e8d7612d38 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 22 Jul 2021 17:21:12 +0100 Subject: [PATCH 1/2] Add lerna prereleases --- .github/workflows/release-develop.yml | 52 +++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/release-develop.yml diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml new file mode 100644 index 0000000000..f457b1e85c --- /dev/null +++ b/.github/workflows/release-develop.yml @@ -0,0 +1,52 @@ +name: Budibase Release + +on: + push: + branches: + - develop + +env: + POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }} + POSTHOG_URL: ${{ secrets.POSTHOG_URL }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + - run: yarn + - run: yarn bootstrap + - run: yarn lint + - run: yarn build + - run: yarn test + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: eu-west-1 + + - 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 Release Bot" + git config user.email "<>" + echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc + yarn release:develop + + - name: Build/release Docker images + run: | + docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + yarn build + yarn build:docker + env: + DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} diff --git a/package.json b/package.json index 61ff67b076..4f545d935f 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "publishdev": "lerna run publishdev", "publishnpm": "yarn build && lerna publish --force-publish", "release": "yarn build && lerna publish patch --yes --force-publish", + "release:develop": "yarn build && lerna publish prerelease --yes --force-publish --dist-tag develop", "restore": "yarn run clean && yarn run bootstrap && yarn run build", "nuke": "yarn run nuke:packages && yarn run nuke:docker", "nuke:packages": "yarn run restore", From 7b408e65f776ec79304b0308669525f7b4e94e41 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 09:44:03 +0100 Subject: [PATCH 2/2] Add unique name to staging release bot --- .github/workflows/release-develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index f457b1e85c..daf3dae8c2 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -37,7 +37,7 @@ jobs: 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 Release Bot" + git config user.name "Budibase Staging Release Bot" git config user.email "<>" echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc yarn release:develop