Arazzo Engine Release #4
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: Arazzo Engine Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| component: | |
| description: Select component to release | |
| required: true | |
| type: choice | |
| options: | |
| - Arazzo Generator | |
| - Arazzo Runner | |
| default: Arazzo Generator | |
| bump: | |
| description: Select version bump | |
| required: true | |
| type: choice | |
| options: | |
| - major | |
| - minor | |
| - patch | |
| default: patch | |
| permissions: | |
| contents: write | |
| jobs: | |
| arazzo-runner-release: | |
| name: Release Arazzo Runner | |
| if: ${{ inputs.component == 'Arazzo Runner' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create GitHub App token | |
| id: app-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.ARAZZO_BUILDER_APP_ID }} | |
| private-key: ${{ secrets.ARAZZO_BUILDER_PRIVATE_KEY }} | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Install PDM plugins | |
| run: pip install pdm && pdm install --plugins | |
| working-directory: ./runner | |
| - name: Configure git | |
| run: | | |
| git config user.name "${{ steps.app-token.outputs.app-slug }}[bot]" | |
| git config user.email "${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com" | |
| - name: Bump runner version | |
| id: bump-runner-version | |
| run: | | |
| pdm bump ${{ inputs.bump }} -c -m "chore(release): cut the arazzo_runner v{to} release" -t | |
| echo "version=$(pdm show --version)" >> "$GITHUB_OUTPUT" | |
| working-directory: ./runner | |
| - name: Create runner tag | |
| id: tag-runner-version | |
| run: | | |
| TAG="arazzo_runner/v${{ steps.bump-runner-version.outputs.version }}" | |
| git tag -a "$TAG" -m "$TAG" | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| - name: Push commit and tag | |
| run: | | |
| TAG="${{ steps.tag-runner-version.outputs.tag }}" | |
| git push --atomic origin "refs/heads/${{ github.ref_name }}" "refs/tags/${TAG}" | |
| - name: Create Arazzo Runner Draft GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.tag-runner-version.outputs.tag }} | |
| name: Arazzo Runner v${{ steps.bump-runner-version.outputs.version }} | |
| draft: true | |
| generate_release_notes: true | |
| arazzo-generator-release: | |
| name: Release Arazzo Generator | |
| if: ${{ inputs.component == 'Arazzo Generator' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create GitHub App token | |
| id: app-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.ARAZZO_BUILDER_APP_ID }} | |
| private-key: ${{ secrets.ARAZZO_BUILDER_PRIVATE_KEY }} | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Install PDM plugins | |
| run: pip install pdm && pdm install --plugins | |
| working-directory: ./generator | |
| - name: Configure git | |
| run: | | |
| git config user.name "${{ steps.app-token.outputs.app-slug }}[bot]" | |
| git config user.email "${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com" | |
| - name: Bump generator version | |
| id: bump-generator-version | |
| run: | | |
| pdm bump ${{ inputs.bump }} -c -m "chore(release): cut the arazzo_generator v{to} release" | |
| echo "version=$(pdm show --version)" >> "$GITHUB_OUTPUT" | |
| working-directory: ./generator | |
| - name: Create generator tag | |
| id: tag-generator-version | |
| run: | | |
| TAG="arazzo_generator/v${{ steps.bump-generator-version.outputs.version }}" | |
| git tag -a "$TAG" -m "$TAG" | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| - name: Push commit and tag | |
| run: | | |
| TAG="${{ steps.tag-generator-version.outputs.tag }}" | |
| git push --atomic origin "refs/heads/${{ github.ref_name }}" "refs/tags/${TAG}" | |
| - name: Create Arazzo Generator Draft GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.tag-generator-version.outputs.tag }} | |
| name: Arazzo Generator v${{ steps.bump-generator-version.outputs.version }} | |
| draft: true | |
| generate_release_notes: true |