2021-07-23 17:19:43 +02:00
|
|
|
name: Budibase Release Staging
|
2021-07-22 18:21:12 +02:00
|
|
|
|
2022-02-15 14:24:06 +01:00
|
|
|
on:
|
|
|
|
push:
|
2021-07-22 18:21:12 +02:00
|
|
|
branches:
|
|
|
|
- develop
|
2021-12-31 14:59:48 +01:00
|
|
|
paths:
|
2022-02-15 14:24:06 +01:00
|
|
|
- '.aws/**'
|
|
|
|
- '.github/**'
|
|
|
|
- 'charts/**'
|
|
|
|
- 'packages/**'
|
|
|
|
- 'scripts/**'
|
|
|
|
- 'package.json'
|
|
|
|
- 'yarn.lock'
|
|
|
|
- 'package.json'
|
|
|
|
- 'yarn.lock'
|
2021-07-22 18:21:12 +02:00
|
|
|
|
|
|
|
env:
|
|
|
|
POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }}
|
2021-09-21 12:47:14 +02:00
|
|
|
INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }}
|
2021-07-22 18:21:12 +02:00
|
|
|
POSTHOG_URL: ${{ secrets.POSTHOG_URL }}
|
2022-04-21 23:20:38 +02:00
|
|
|
PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
2022-02-15 14:24:06 +01:00
|
|
|
|
2021-07-22 18:21:12 +02:00
|
|
|
jobs:
|
|
|
|
release:
|
2022-02-15 14:24:06 +01:00
|
|
|
runs-on: ubuntu-latest
|
2021-07-22 18:21:12 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
2021-11-18 11:59:35 +01:00
|
|
|
node-version: 14.x
|
2022-04-20 17:11:06 +02:00
|
|
|
|
2022-04-21 22:55:16 +02:00
|
|
|
- name: Install Pro
|
2022-04-21 23:12:57 +02:00
|
|
|
run: yarn install:pro develop
|
2022-04-20 17:11:06 +02:00
|
|
|
|
2022-02-15 14:24:06 +01:00
|
|
|
- run: yarn
|
|
|
|
- run: yarn bootstrap
|
|
|
|
- run: yarn lint
|
|
|
|
- run: yarn build
|
2021-07-22 18:21:12 +02:00
|
|
|
- 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
|
|
|
|
|
2022-04-20 21:32:00 +02:00
|
|
|
- name: Publish budibase packages to NPM
|
|
|
|
env:
|
|
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
run: |
|
|
|
|
# setup the username and email.
|
2022-04-20 21:59:37 +02:00
|
|
|
git config --global user.name "Budibase Staging Release Bot"
|
|
|
|
git config --global user.email "<>"
|
2022-04-20 21:32:00 +02:00
|
|
|
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
|
2022-04-20 22:25:12 +02:00
|
|
|
yarn release:develop
|
2022-04-20 17:11:06 +02:00
|
|
|
|
2022-04-20 22:25:12 +02:00
|
|
|
- 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 }}
|