Repository navigation
feat(app-client): add P1Y to portal extension hook interval enums #2575
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: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| tags: ["@epilot/sdk@*", "@epilot/cli@*"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: package.json | |
| cache: "pnpm" | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm lint | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: package.json | |
| cache: "pnpm" | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm generate-sdk | |
| - run: pnpm build | |
| - run: pnpm test | |
| auto-release: | |
| name: Auto-release @epilot/sdk and @epilot/cli | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: auto-release | |
| cancel-in-progress: false | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip release]') | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 2 | |
| - name: Check for changes | |
| id: check | |
| run: | | |
| CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD) | |
| if echo "$CHANGED_FILES" | grep -q '^clients/.*/openapi\.json$'; then | |
| echo "sdk=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "sdk=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| if echo "$CHANGED_FILES" | grep -qE '^(packages/cli/|packages/cli-wrapper/|clients/.*/openapi\.json$)'; then | |
| echo "cli=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "cli=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Install pnpm | |
| if: steps.check.outputs.sdk == 'true' || steps.check.outputs.cli == 'true' | |
| uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v5 | |
| if: steps.check.outputs.sdk == 'true' || steps.check.outputs.cli == 'true' | |
| with: | |
| node-version-file: package.json | |
| cache: "pnpm" | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Install dependencies | |
| if: steps.check.outputs.sdk == 'true' || steps.check.outputs.cli == 'true' | |
| run: pnpm install --frozen-lockfile | |
| - name: Build and test SDK | |
| if: steps.check.outputs.sdk == 'true' | |
| run: | | |
| pnpm --filter @epilot/sdk generate | |
| pnpm --filter @epilot/sdk build | |
| pnpm --filter @epilot/sdk test | |
| - name: Build and test CLI | |
| if: steps.check.outputs.cli == 'true' | |
| run: | | |
| pnpm --filter @epilot/cli build | |
| pnpm --filter @epilot/cli test | |
| - name: Bump versions, commit, tag and push | |
| if: steps.check.outputs.sdk == 'true' || steps.check.outputs.cli == 'true' | |
| id: version | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| TAGS="" | |
| FILES_TO_ADD="" | |
| # Bump SDK version | |
| if [ "${{ steps.check.outputs.sdk }}" = "true" ]; then | |
| SDK_VERSION=$(node -e " | |
| const fs = require('fs'); | |
| const path = 'packages/epilot-sdk-v2/package.json'; | |
| const pkg = JSON.parse(fs.readFileSync(path, 'utf8')); | |
| const [major, minor, patch] = pkg.version.split('.').map(Number); | |
| pkg.version = major + '.' + minor + '.' + (patch + 1); | |
| fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n'); | |
| process.stdout.write(pkg.version); | |
| ") | |
| echo "sdk_version=${SDK_VERSION}" >> "$GITHUB_OUTPUT" | |
| cd "$GITHUB_WORKSPACE" | |
| pnpm lint:fix | |
| FILES_TO_ADD="packages/epilot-sdk-v2/ README.md" | |
| TAGS="$TAGS @epilot/sdk@${SDK_VERSION}" | |
| fi | |
| # Bump CLI version | |
| if [ "${{ steps.check.outputs.cli }}" = "true" ]; then | |
| CLI_VERSION=$(node -e " | |
| const fs = require('fs'); | |
| const path = 'packages/cli/package.json'; | |
| const pkg = JSON.parse(fs.readFileSync(path, 'utf8')); | |
| const [major, minor, patch] = pkg.version.split('.').map(Number); | |
| pkg.version = major + '.' + minor + '.' + (patch + 1); | |
| fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n'); | |
| process.stdout.write(pkg.version); | |
| ") | |
| echo "cli_version=${CLI_VERSION}" >> "$GITHUB_OUTPUT" | |
| node -e " | |
| const fs = require('fs'); | |
| const path = 'packages/cli-wrapper/package.json'; | |
| const pkg = JSON.parse(fs.readFileSync(path, 'utf8')); | |
| pkg.version = '${CLI_VERSION}'; | |
| fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n'); | |
| " | |
| FILES_TO_ADD="$FILES_TO_ADD packages/cli/package.json packages/cli-wrapper/package.json" | |
| TAGS="$TAGS @epilot/cli@${CLI_VERSION}" | |
| fi | |
| # Single commit and push | |
| git add $FILES_TO_ADD | |
| COMMIT_MSG="" | |
| if [ "${{ steps.check.outputs.sdk }}" = "true" ]; then | |
| COMMIT_MSG="@epilot/sdk@${SDK_VERSION}" | |
| fi | |
| if [ "${{ steps.check.outputs.cli }}" = "true" ]; then | |
| [ -n "$COMMIT_MSG" ] && COMMIT_MSG="$COMMIT_MSG, " | |
| COMMIT_MSG="${COMMIT_MSG}@epilot/cli@${CLI_VERSION}" | |
| fi | |
| git commit -m "$COMMIT_MSG" | |
| for TAG in $TAGS; do | |
| git tag "$TAG" | |
| done | |
| git push origin main --follow-tags | |
| - name: Rebuild CLI with bumped version | |
| if: steps.check.outputs.cli == 'true' | |
| run: pnpm --filter @epilot/cli build | |
| - name: Publish @epilot/sdk | |
| if: steps.check.outputs.sdk == 'true' | |
| run: pnpm publish --ignore-scripts --no-git-checks | |
| working-directory: packages/epilot-sdk-v2 | |
| - name: Publish @epilot/cli | |
| if: steps.check.outputs.cli == 'true' | |
| run: pnpm publish --ignore-scripts --no-git-checks | |
| working-directory: packages/cli | |
| - name: Publish epilot wrapper | |
| if: steps.check.outputs.cli == 'true' | |
| run: pnpm publish --ignore-scripts --no-git-checks | |
| working-directory: packages/cli-wrapper | |
| publish-sdk: | |
| name: Publish @epilot/sdk to npm | |
| needs: [lint, test] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/@epilot/sdk@') | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: package.json | |
| cache: "pnpm" | |
| registry-url: https://registry.npmjs.org/ | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| - name: Publish @epilot/sdk | |
| run: pnpm publish --ignore-scripts --no-git-checks | |
| working-directory: packages/epilot-sdk-v2 | |
| publish-cli: | |
| name: Publish @epilot/cli to npm | |
| needs: [lint, test] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/@epilot/cli@') | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: package.json | |
| cache: "pnpm" | |
| registry-url: https://registry.npmjs.org/ | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm --filter @epilot/cli build | |
| - name: Publish @epilot/cli | |
| run: pnpm publish --ignore-scripts --no-git-checks || true | |
| working-directory: packages/cli | |
| - name: Publish epilot wrapper | |
| run: pnpm publish --ignore-scripts --no-git-checks | |
| working-directory: packages/cli-wrapper |