.github/workflows/release.yml
.github/workflows/release.ymlBrowse 1970 files
1,618 tokens
5,411 bytes
Token encoding: o200k_base
Snapshot 21a254f
← Back to SKILL.md
1# checkout RELEASE.md for more information2name: Release3 4on:5 push:6 # pushing a new tag is what triggers the release process7 tags:8 - "v*"9 10permissions:11 contents: write12 packages: write13 14env:15 MISE_ENV: ci16 17jobs:18 publish-builder:19 runs-on: ubuntu-latest20 steps:21 # duplicated on the integration-tests.yml job, keep these in sync22 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd23 - uses: jdx/mise-action@1648a7812b9aeae629881980618f07993286915124 - uses: docker/setup-docker-action@77e84dbf09b47d1e29270283c22f16145aa85ca125 with:26 version: ${{ env.DOCKER_VERSION }}27 - uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c328 - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df529 - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee30 with:31 registry: ${{ env.PRODUCTION_CONTAINER_REGISTRY }}32 username: ${{ github.actor }}33 password: ${{ secrets.GITHUB_TOKEN }}34 35 - name: Generate Tags & Metadata36 id: meta37 uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e938 with:39 images: ${{ env.PRODUCTION_BUILDER_IMAGE_NAME }}40 # latest tag is automatically generated41 tags: |42 type=raw,value=debian-trixie43 type=semver,pattern={{version}}44 type=raw,value=${{ env.PRODUCTION_MISE_TAG }}45 type=sha,format=long46 type=raw,value={{date 'YYYYMMDD'}}47 48 - name: Build and push Docker image49 uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf50 with:51 context: images/debian/build52 platforms: linux/amd64,linux/arm6453 push: true54 tags: ${{ steps.meta.outputs.tags }}55 labels: ${{ steps.meta.outputs.labels }}56 build-args: |57 MISE_VERSION=${{ env.RAILPACK_MISE_VERSION }}58 59 publish-runtime:60 runs-on: ubuntu-latest61 env:62 IMAGE_NAME: ${{ github.repository }}-runtime63 steps:64 # duplicated on the integration-tests.yml job, keep these in sync65 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd66 - uses: jdx/mise-action@1648a7812b9aeae629881980618f07993286915167 - uses: docker/setup-docker-action@77e84dbf09b47d1e29270283c22f16145aa85ca168 with:69 version: ${{ env.DOCKER_VERSION }}70 - uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c371 - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df572 - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee73 with:74 registry: ${{ env.PRODUCTION_CONTAINER_REGISTRY }}75 username: ${{ github.actor }}76 password: ${{ secrets.GITHUB_TOKEN }}77 78 - name: Generate Tags & Metadata79 id: meta80 uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e981 with:82 # the mise version is NOT required for the runtime image, but it is helpful to have them tagged using the same exact version83 # this makes it easy to ensure we (a) pin the runtime and build images to the same external build image and (b) allows us to build84 # these images *before* the railpack binary build step to ensure they are properly created (railpack relies on them existing, so we want85 # a successful builder + runtime image build before building and releasing a new railpack frontend).86 images: ${{ env.PRODUCTION_RUNTIME_IMAGE_NAME }}87 # latest tag is automatically generated88 tags: |89 type=raw,value=debian-trixie90 type=semver,pattern={{version}}91 type=raw,value=${{ env.PRODUCTION_MISE_TAG }}92 type=sha,format=long93 type=raw,value={{date 'YYYYMMDD'}}94 95 - name: Build and push Docker image96 uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf97 with:98 context: images/debian/runtime99 platforms: linux/amd64,linux/arm64100 push: true101 tags: ${{ steps.meta.outputs.tags }}102 labels: ${{ steps.meta.outputs.labels }}103 104 release:105 runs-on: ubuntu-latest106 needs: [publish-builder, publish-runtime]107 steps:108 - name: Checkout109 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd110 with:111 fetch-depth: 0112 - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151113 - uses: docker/setup-docker-action@77e84dbf09b47d1e29270283c22f16145aa85ca1114 with:115 version: ${{ env.DOCKER_VERSION }}116 - uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3117 - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5118 - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee119 with:120 registry: ${{ env.PRODUCTION_CONTAINER_REGISTRY }}121 username: ${{ github.actor }}122 password: ${{ secrets.GITHUB_TOKEN }}123 124 - name: Release Updated Railpack CLI and Frontend Images125 id: goreleaser126 uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89127 with:128 distribution: goreleaser129 version: "~> v2"130 args: release --clean131 env:132 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}133