cloudsmith-package-synchronised #9066
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: Build Release Image | |
| on: | |
| repository_dispatch: | |
| types: | |
| - cloudsmith-package-synchronised | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: write | |
| pages: write | |
| jobs: | |
| build-release-docker-image: | |
| # The Alpine version in these package-name gates (here and in the versioned | |
| # jobs below) must match the base image in .dockerfiles/release/Dockerfile. | |
| if: | | |
| github.event.client_payload.data.repository == 'releases' && | |
| (github.event.client_payload.data.name == 'ponyc-x86-64-unknown-linux-alpine3.24.tar.gz' || | |
| github.event.client_payload.data.name == 'ponyc-arm64-unknown-linux-alpine3.24.tar.gz') | |
| concurrency: | |
| group: build-release-image | |
| cancel-in-progress: true | |
| name: Build release image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| - name: Set up Docker Buildx | |
| # v3.10.0 | |
| uses: docker/setup-buildx-action@v4 | |
| with: | |
| version: v0.23.0 | |
| cache-binary: false | |
| - name: Login to GitHub Container Registry | |
| # v2.2.0 | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| run: bash .dockerfiles/release/build-and-push.bash | |
| build-versioned-amd64-docker-image: | |
| if: | | |
| github.event.client_payload.data.repository == 'releases' && | |
| github.event.client_payload.data.name == 'ponyc-x86-64-unknown-linux-alpine3.24.tar.gz' | |
| concurrency: | |
| group: build-versioned-amd64-docker-image | |
| cancel-in-progress: true | |
| name: Build versioned amd64 release image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| - name: Set up Docker Buildx | |
| # v3.10.0 | |
| uses: docker/setup-buildx-action@v4 | |
| with: | |
| version: v0.23.0 | |
| cache-binary: false | |
| - name: Login to GitHub Container Registry | |
| # v2.2.0 | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| run: bash .dockerfiles/release/build-and-push-versioned.bash | |
| env: | |
| VERSION: ${{ github.event.client_payload.data.version }} | |
| build-versioned-arm64-docker-image: | |
| if: | | |
| github.event.client_payload.data.repository == 'releases' && | |
| github.event.client_payload.data.name == 'ponyc-arm64-unknown-linux-alpine3.24.tar.gz' | |
| concurrency: | |
| group: build-versioned-arm64-docker-image | |
| cancel-in-progress: true | |
| name: Build versioned arm64 release image | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| - name: Set up Docker Buildx | |
| # v3.10.0 | |
| uses: docker/setup-buildx-action@v4 | |
| with: | |
| version: v0.23.0 | |
| cache-binary: false | |
| - name: Login to GitHub Container Registry | |
| # v2.2.0 | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| run: bash .dockerfiles/release/build-and-push-versioned.bash | |
| env: | |
| VERSION: ${{ github.event.client_payload.data.version }} | |
| build-multiplatform-versioned-release-docker-image-triggered-by-amd64: | |
| needs: | |
| - build-versioned-amd64-docker-image | |
| name: Create multiplatform versioned release image | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: build-multiplatform-versioned-release-docker-image | |
| cancel-in-progress: true | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Login to GitHub Container Registry | |
| # v2.2.0 | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Merge | |
| run: bash .dockerfiles/release/combine-versioned-images.bash | |
| env: | |
| VERSION: ${{ github.event.client_payload.data.version }} | |
| build-multiplatform-versioned-release-docker-image-triggered-by-arm64: | |
| needs: | |
| - build-versioned-arm64-docker-image | |
| name: Create multiplatform versioned release image | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: build-multiplatform-versioned-release-docker-image | |
| cancel-in-progress: true | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Login to GitHub Container Registry | |
| # v2.2.0 | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Merge | |
| run: bash .dockerfiles/release/combine-versioned-images.bash | |
| env: | |
| VERSION: ${{ github.event.client_payload.data.version }} | |
| update-playground-image-on-release: | |
| needs: | |
| - build-release-docker-image | |
| name: Update https://playground.ponylang.io/ | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Run remote command | |
| uses: ponylang-main/ssh-action@ffff33f8fe0318345a4f00f0e847325954b2a3ed | |
| with: | |
| host: ${{ secrets.PLAYGROUND_HOST }} | |
| username: ${{ secrets.PLAYGROUND_ADMIN_USER }} | |
| key: ${{ secrets.PLAYGROUND_KEY }} | |
| script: bash update-playground.bash | |
| update-stdlib-builder-image-on-release: | |
| needs: | |
| - build-release-docker-image | |
| name: Update stdlib-builder Docker image with newly released ponyc version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Login to GitHub Container Registry | |
| # v2.2.0 | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| run: bash .ci-dockerfiles/stdlib-builder/build-and-push.bash | |
| build-and-push-stdlib-documentation: | |
| needs: | |
| - update-stdlib-builder-image-on-release | |
| name: Build and Push standard library documentation | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/ponylang/ponyc-ci-stdlib-builder:release | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| - name: Build | |
| run: "bash .ci-scripts/build-stdlib-documentation.bash" | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'stdlib-docs/site/' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| trigger-release-announcement: | |
| needs: | |
| - build-and-push-stdlib-documentation | |
| - update-playground-image-on-release | |
| name: Trigger release announcement | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: "main" | |
| token: ${{ secrets.RELEASE_TOKEN }} | |
| - name: Trigger | |
| uses: docker://ghcr.io/ponylang/release-bot-action:0.6.6 | |
| with: | |
| entrypoint: trigger-release-announcement | |
| env: | |
| GIT_USER_NAME: "Ponylang Main Bot" | |
| GIT_USER_EMAIL: "ponylang.main@gmail.com" | |
| CUSTOM_VERSION: ${{ github.event.client_payload.data.version }} | |
| send-release-image-pushed-event: | |
| needs: | |
| - build-release-docker-image | |
| name: Send release event | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| repo: | |
| - ponylang/library-documentation-action | |
| - ponylang/library-documentation-action-v2 | |
| - ponylang/shared-docker | |
| steps: | |
| - name: Send | |
| # v2.1.1 | |
| uses: peter-evans/repository-dispatch@8324ecf35877f9b02961dd5aaf43ed7be7db9373 | |
| with: | |
| token: ${{ secrets.PONYLANG_MAIN_API_TOKEN }} | |
| repository: ${{ matrix.repo }} | |
| event-type: ponyc-release-image-pushed | |
| client-payload: '{"version": "${{ github.event.client_payload.data.version }}"}' |