|
| 1 | +name: Show Release Outputs |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + |
| 6 | +jobs: |
| 7 | + is_release: |
| 8 | + name: Is release? |
| 9 | + runs-on: ubuntu-latest |
| 10 | + outputs: |
| 11 | + release: ${{ steps.version.outputs.release }} |
| 12 | + steps: |
| 13 | + - name: Checkout Repo |
| 14 | + uses: actions/checkout@v3 |
| 15 | + |
| 16 | + - name: Install pnpm |
| 17 | + uses: pnpm/action-setup@v3 |
| 18 | + id: pnpm-install |
| 19 | + with: |
| 20 | + version: 9.5 |
| 21 | + |
| 22 | + - name: Setup Node |
| 23 | + uses: actions/setup-node@v3 |
| 24 | + with: |
| 25 | + node-version: "18.x" |
| 26 | + registry-url: "https://registry.npmjs.org" |
| 27 | + cache: pnpm |
| 28 | + cache-dependency-path: pnpm-lock.yaml |
| 29 | + |
| 30 | + - name: Configure pnpm |
| 31 | + run: | |
| 32 | + pnpm config set auto-install-peers true |
| 33 | + pnpm config set exclude-links-from-lockfile true |
| 34 | +
|
| 35 | + - name: Install dependencies |
| 36 | + run: pnpm install --frozen-lockfile |
| 37 | + |
| 38 | + - name: Check if new version |
| 39 | + id: version |
| 40 | + run: | |
| 41 | + IS_RELEASE=$(./.github/scripts/is_release.sh) |
| 42 | + echo "release=$IS_RELEASE" >> "$GITHUB_OUTPUT" |
| 43 | +
|
| 44 | + changes: |
| 45 | + name: Repository changes |
| 46 | + needs: [is_release] |
| 47 | + if: needs.is_release.outputs.release == 'true' |
| 48 | + runs-on: ubuntu-latest |
| 49 | + outputs: |
| 50 | + js: ${{ steps.js.outputs.release }} |
| 51 | + python: ${{ steps.python.outputs.release }} |
| 52 | + charts: ${{ steps.charts.outputs.release }} |
| 53 | + template: ${{ steps.template.outputs.release }} |
| 54 | + steps: |
| 55 | + - name: Checkout repository |
| 56 | + uses: actions/checkout@v3 |
| 57 | + with: |
| 58 | + fetch-depth: 0 |
| 59 | + |
| 60 | + - name: Check JavasScript SDK Release |
| 61 | + id: js |
| 62 | + run: | |
| 63 | + IS_RELEASE=$(./.github/scripts/is_release_for_package.sh "@e2b/code-interpreter") |
| 64 | + echo "release=$IS_RELEASE" >> "$GITHUB_OUTPUT" |
| 65 | +
|
| 66 | + - name: Check Python SDK Release |
| 67 | + id: python |
| 68 | + run: | |
| 69 | + IS_RELEASE=$(./.github/scripts/is_release_for_package.sh "e2b-code-interpreter") |
| 70 | + echo "release=$IS_RELEASE" >> "$GITHUB_OUTPUT" |
| 71 | +
|
| 72 | + - name: Check Python SDK Release |
| 73 | + id: charts |
| 74 | + run: | |
| 75 | + IS_RELEASE=$(./.github/scripts/is_release_for_package.sh "e2b-charts") |
| 76 | + echo "release=$IS_RELEASE" >> "$GITHUB_OUTPUT" |
| 77 | +
|
| 78 | + - name: Check Template SDK Release |
| 79 | + id: template |
| 80 | + run: | |
| 81 | + IS_RELEASE=$(./.github/scripts/is_release_for_package.sh "@e2b/code-interpreter-template") |
| 82 | + echo "release=$IS_RELEASE" >> "$GITHUB_OUTPUT" |
| 83 | +
|
| 84 | + changes_print: |
| 85 | + name: Print changes |
| 86 | + needs: [changes] |
| 87 | + runs-on: ubuntu-latest |
| 88 | + steps: |
| 89 | + - name: Print outputs |
| 90 | + run: | |
| 91 | + echo "JS Release: ${{ needs.changes.outputs.js }}" |
| 92 | + echo "Python Release: ${{ needs.changes.outputs.python }}" |
| 93 | + echo "Charts Release: ${{ needs.changes.outputs.charts }}" |
| 94 | + echo "Template Release: ${{ needs.changes.outputs.template }}" |
0 commit comments