1
0
Fork 0
mirror of synced 2024-07-03 21:40:55 +12:00
budibase/.github/workflows/release.yml

82 lines
2.6 KiB
YAML
Raw Normal View History

name: Budibase Release
2021-09-17 08:15:09 +12:00
on:
2020-05-16 01:39:27 +12:00
push:
2021-05-20 23:57:29 +12:00
branches:
- master
env:
POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }}
2021-09-21 22:47:14 +12:00
INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }}
POSTHOG_URL: ${{ secrets.POSTHOG_URL }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
2021-09-17 08:15:09 +12:00
jobs:
2020-05-15 09:27:38 +12:00
release:
2021-09-17 08:15:09 +12:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
2021-09-17 08:15:09 +12:00
- run: yarn
- run: yarn bootstrap
- run: yarn lint
- run: yarn build
2020-05-19 05:05:36 +12: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
2021-05-27 02:08:57 +12:00
- name: Publish budibase packages to NPM
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2021-09-17 08:15:09 +12:00
run: |
2021-05-27 02:52:31 +12: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-17 08:15:09 +12:00
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
2021-05-27 02:52:31 +12:00
yarn release
2021-09-17 08:15:09 +12:00
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- 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 }}
BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }}
2021-12-09 06:13:00 +13:00
# - name: Pull values.yaml from budibase-infra
# run: |
# curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ [c3a7a9d12]
# -H 'Accept: application/vnd.github.v3.raw' \
2021-12-16 07:49:14 +13:00
# -o values.preprod.yaml \
# -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: |
# appVersion: ${{ steps.previoustag.outputs.tag }}
# value-files: >-
# [
# "values.preprod.yaml"
# ]
# env:
# KUBECONFIG_FILE: '${{ secrets.PREPROD_KUBECONFIG }}'