2021-07-23 17:19:43 +02:00
|
|
|
name: Budibase Release Staging
|
2021-07-22 18:21:12 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- develop
|
|
|
|
|
|
|
|
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 }}
|
|
|
|
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
|
2021-07-23 10:44:03 +02:00
|
|
|
git config user.name "Budibase Staging Release Bot"
|
2021-07-22 18:21:12 +02:00
|
|
|
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
|
2021-07-23 11:02:12 +02:00
|
|
|
yarn build:docker:develop
|
2021-07-22 18:21:12 +02:00
|
|
|
env:
|
|
|
|
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|