name: Budibase Release Staging on: push: branches: - develop - feature/licensing paths: - '.aws/**' - '.github/**' - 'charts/**' - 'packages/**' - 'scripts/**' - 'package.json' - 'yarn.lock' - 'package.json' - 'yarn.lock' env: POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }} INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }} POSTHOG_URL: ${{ secrets.POSTHOG_URL }} jobs: release: runs-on: ubuntu-latest steps: - name: Extract branch name shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF_NAME})" id: extract_branch - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 14.x # Add @budibase/pro to filesystem - name: Checkout pro uses: actions/checkout@v2 with: repository: budibase/budibase-pro ref: ${{ steps.extract_branch.outputs.branch }} 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 - 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. git config --global user.name "Budibase Staging Release Bot" git config --global user.email "<>" echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc # yarn release:develop - name: Get the latest budibase release version id: version run: | release_version=$(cat lerna.json | jq -r '.version') echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV - name: Publish @budibase/pro package to NPM env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} VERSION: ${{ steps.previoustag.outputs.tag }} run: | cd ../budibase-pro echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc yarn release:develop $RELEASE_VERSION # - 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 }}