chore(CODEOWNERS): same owners for api-docs and ci-standard-check #164
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'verify-transpiled-code' | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: | | |
npm config set '//npm.pkg.github.com/:_authToken' ${{ secrets.GH_TOKEN }} | |
npm config set @typeform:registry https://npm.pkg.github.com/ | |
- run: | | |
yarn install | |
mv dist/ source-dist | |
yarn run all | |
- name: Run integrity check | |
run: | | |
#!/bin/bash | |
hash_function="sha256sum" | |
for file in dist/* | |
do | |
source_file=${file/dist/source-dist} # Replaces "dist" for "source-dist" in ${file} | |
hash_source=$(${hash_function} "${source_file}" | awk '{print $1;}') | |
hash_target=$(${hash_function} "${file}" | awk '{print $1;}') | |
if [ ! "${hash_source}" == "${hash_target}" ]; then | |
echo "There is a mismatch in ${file}. Either you forgot to generate it and push it or it wasn't generated correctly." | |
exit 1 | |
fi | |
done |