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
|
2022-04-20 17:11:06 +02:00
|
|
|
- feature/licensing
|
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-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
|
|
|
|
|
|
|
# Add @budibase/pro to filesystem
|
|
|
|
- name: Checkout pro
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: budibase/budibase-pro
|
2022-04-20 17:48:45 +02:00
|
|
|
ref: ${GITHUB_REF_NAME}
|
2022-04-20 17:11:06 +02:00
|
|
|
path: './pro'
|
|
|
|
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
|
|
|
- name: Setup pro
|
|
|
|
run: mv pro ../budibase-pro && cd ../budibase-pro && yarn setup
|
|
|
|
|
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 17:11:06 +02:00
|
|
|
# - 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 Staging Release Bot"
|
|
|
|
# git config user.email "<>"
|
|
|
|
# echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
|
|
|
|
# yarn release:develop
|
|
|
|
|
|
|
|
- name: 'Get Previous tag'
|
|
|
|
id: previoustag
|
|
|
|
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
|
|
|
|
|
|
|
- name: Publish @budibase/pro package to NPM
|
2021-07-22 18:21:12 +02:00
|
|
|
env:
|
|
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2022-04-20 17:11:06 +02:00
|
|
|
VERSION: ${{ steps.previoustag.outputs.tag }}
|
2022-02-15 14:24:06 +01:00
|
|
|
run: |
|
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 "<>"
|
2022-04-20 17:11:06 +02:00
|
|
|
cd ../budibase-pro
|
2021-07-22 18:21:12 +02:00
|
|
|
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
|
2022-04-20 17:11:06 +02:00
|
|
|
yarn release:develop $VERSION
|
2021-07-22 18:21:12 +02:00
|
|
|
|
2022-04-20 17:11:06 +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 }}
|