CID-21024 Get repo ready to go public #727
This file contains hidden or 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: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| - 'experiments/**/*' | |
| - '_integration/**/*' | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - '*' | |
| permissions: | |
| actions: read | |
| contents: write | |
| id-token: write | |
| security-events: write | |
| jobs: | |
| test-typescript: | |
| name: TypeScript Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.head_ref || github.ref }} | |
| - name: Setup Node.js | |
| id: setup-node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .node-version | |
| cache: npm | |
| - name: Install Dependencies | |
| id: npm-ci | |
| run: npm ci | |
| - name: Run all package scripts | |
| run: npm run all | |
| - name: Compare the expected and actual dist/ directories | |
| id: diff | |
| run: | | |
| if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | |
| echo "Detected uncommitted changes after build." | |
| echo "changes_detected=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "No changes detected in dist/ directory."; | |
| echo "changes_detected=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Commit and push dist/ changes | |
| if: | |
| github.event_name == 'pull_request' && | |
| steps.diff.outputs.changes_detected == 'true' | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| git add dist/ | |
| git commit -m "chore: update dist/ directory [automated]" | |
| git push | |
| test-action: | |
| name: GitHub Actions Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@v6 | |
| - name: Test Local Action | |
| id: test-action | |
| uses: ./ |