2020-05-14 22:48:02 +02:00
|
|
|
name: Budibase Release
|
|
|
|
|
2021-09-16 22:15:09 +02:00
|
|
|
on:
|
2020-05-15 15:39:27 +02:00
|
|
|
push:
|
2021-05-20 13:57:29 +02:00
|
|
|
branches:
|
2021-12-16 19:24:07 +01:00
|
|
|
- master
|
2021-06-08 21:43:01 +02:00
|
|
|
|
|
|
|
env:
|
|
|
|
POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }}
|
2021-09-21 12:47:14 +02:00
|
|
|
INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }}
|
2021-06-08 21:43:01 +02:00
|
|
|
POSTHOG_URL: ${{ secrets.POSTHOG_URL }}
|
|
|
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
2021-09-16 22:15:09 +02:00
|
|
|
|
2020-05-14 22:48:02 +02:00
|
|
|
jobs:
|
2020-05-14 23:27:38 +02:00
|
|
|
release:
|
2021-09-16 22:15:09 +02:00
|
|
|
runs-on: ubuntu-latest
|
2021-05-26 17:48:03 +02:00
|
|
|
|
2020-05-14 22:48:02 +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
|
2021-09-16 22:15:09 +02:00
|
|
|
- run: yarn
|
|
|
|
- run: yarn bootstrap
|
|
|
|
- run: yarn lint
|
|
|
|
- run: yarn build
|
2020-05-18 19:05:36 +02:00
|
|
|
- run: yarn test
|
2020-05-15 17:06:53 +02:00
|
|
|
|
2021-05-26 18:04:32 +02:00
|
|
|
- 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
|
|
|
|
|
2021-05-26 16:08:57 +02:00
|
|
|
- name: Publish budibase packages to NPM
|
|
|
|
env:
|
|
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2021-09-16 22:15:09 +02:00
|
|
|
run: |
|
2021-05-26 16:52:31 +02:00
|
|
|
# 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 "<>"
|
2021-09-16 22:15:09 +02:00
|
|
|
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
|
2021-05-26 16:52:31 +02:00
|
|
|
yarn release
|
2021-01-11 12:24:53 +01:00
|
|
|
|
2021-09-16 22:15:09 +02:00
|
|
|
- name: 'Get Previous tag'
|
|
|
|
id: previoustag
|
|
|
|
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
2021-08-24 17:58:10 +02:00
|
|
|
|
2021-01-11 12:24:53 +01:00
|
|
|
- name: Build/release Docker images
|
2021-09-21 21:21:15 +02:00
|
|
|
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 }}
|
2021-11-18 11:59:35 +01:00
|
|
|
BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }}
|
2021-12-08 18:13:00 +01:00
|
|
|
|
2021-12-15 18:43:12 +01:00
|
|
|
# - name: Pull values.yaml from budibase-infra
|
|
|
|
# run: |
|
2021-12-16 19:24:07 +01:00
|
|
|
# curl -H "Authorization: token ${{ secrets.GH_PERSONAL_TOKEN }}" \ [c3a7a9d12]
|
2021-12-15 18:43:12 +01:00
|
|
|
# -H 'Accept: application/vnd.github.v3.raw' \
|
2021-12-15 19:49:14 +01:00
|
|
|
# -o values.preprod.yaml \
|
2021-12-15 18:43:12 +01:00
|
|
|
# -L https://api.github.com/repos/budibase/budibase-infra/contents/kubernetes/values.preprod.yaml
|
|
|
|
|
|
|
|
# - name: Deploy to Preprod Environment
|
|
|
|
# uses: deliverybot/helm@v1
|
|
|
|
# with:
|
|
|
|
# release: budibase-preprod
|
|
|
|
# namespace: budibase
|
|
|
|
# chart: charts/budibase
|
|
|
|
# token: ${{ github.token }}
|
|
|
|
# values: |
|
2021-12-16 16:04:08 +01:00
|
|
|
# globals.appVersion: ${{ steps.previoustag.outputs.tag }}
|
2021-12-15 18:43:12 +01:00
|
|
|
# value-files: >-
|
|
|
|
# [
|
2021-12-16 16:04:08 +01:00
|
|
|
# "charts/budibase/values.yaml"
|
2021-12-15 18:43:12 +01:00
|
|
|
# ]
|
|
|
|
# env:
|
|
|
|
# KUBECONFIG_FILE: '${{ secrets.PREPROD_KUBECONFIG }}'
|