Skip to content

chore(CODEOWNERS): same owners for api-docs and ci-standard-check #514

chore(CODEOWNERS): same owners for api-docs and ci-standard-check

chore(CODEOWNERS): same owners for api-docs and ci-standard-check #514

name: 'test-and-release-beta'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- name: Set GitHub packages registry
run: |
npm config set '//npm.pkg.github.com/:_authToken' ${{ secrets.GITHUB_TOKEN }}
npm config set @typeform:registry https://npm.pkg.github.com/
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
yarn install
- run: |
yarn run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Test all checks
uses: ./
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
dockerUsername: ${{ secrets.GITLEAKS_DOCKER_USERNAME }}
dockerPassword: ${{ secrets.GITLEAKS_DOCKER_PASSWORD }}
- name: Test skipping checks
uses: ./
with:
skipChecks: 'secrets-scan'
githubToken: ${{ secrets.GITHUB_TOKEN }}
dockerUsername: ${{ secrets.GITLEAKS_DOCKER_USERNAME }}
dockerPassword: ${{ secrets.GITLEAKS_DOCKER_PASSWORD }}
- name: Test enabling optional checks
uses: ./
with:
enableChecks: 'required-typescript'
githubToken: ${{ secrets.GITHUB_TOKEN }}
release: # this releases in beta
needs: [build, test]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Semantic Release
id: semantic
uses: codfish/semantic-release-action@4e9fa8ec064813465dfeccac8ae70f1348fb5dec
with:
repository_url: https://github.com/Typeform/ci-standard-checks.git
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Update beta version tag
if: steps.semantic.outputs.new-release-published == 'true'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Bender Bot Tf"
git tag -fa v${TAG}-beta -m "Update v${TAG}-beta tag"
git push origin v${TAG}-beta --force
env:
TAG: ${{ steps.semantic.outputs.release-major }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}