budibase/.github/workflows/release-develop.yml

91 lines
2.6 KiB
YAML
Raw Normal View History

name: Budibase Release Staging
2021-07-22 18:21:12 +02: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:
- '.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 }}
2021-07-22 18:21:12 +02:00
jobs:
release:
runs-on: ubuntu-latest
2021-07-22 18:21:12 +02:00
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
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
- 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 }}
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 }}