Skip to content

Build and upload Ruby 3.3.5 #47

Build and upload Ruby 3.3.5

Build and upload Ruby 3.3.5 #47

Workflow file for this run

name: Build and upload Ruby runtime
run-name: "Build and upload Ruby ${{ inputs.ruby_version }}${{ inputs.dry_run && ' (dry run)' || '' }}"
on:
workflow_dispatch:
inputs:
ruby_version:
description: "The Ruby version to build, specified as X.Y.Z"
type: string
required: true
dry_run:
description: "Skip deploying to S3 (e.g. for testing)"
type: boolean
default: false
required: false
permissions:
contents: read
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
S3_BUCKET: "heroku-buildpack-ruby"
jobs:
build_ruby:
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-24.04-arm-xlarge' || 'pub-hk-ubuntu-24.04-xlarge' }}
strategy:
matrix:
arch: ["amd64", "arm64"]
base_image: ["heroku-20", "heroku-22", "heroku-24"]
exclude:
- base_image: "heroku-20"
arch: "arm64"
- base_image: "heroku-22"
arch: "arm64"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
run: rustup update
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Cargo build
run: cargo build
- name: Output CHANGELOG
run: cargo run --bin ruby_changelog -- --version "${{inputs.ruby_version}}"
- name: Build Ruby
run: cargo run --bin ruby_build -- --version ${{inputs.ruby_version}} --base-image ${{matrix.base_image}} --arch ${{matrix.arch}}
- name: Check Ruby
run: cargo run --bin ruby_check -- --version ${{inputs.ruby_version}} --base-image ${{matrix.base_image}} --arch ${{matrix.arch}} | tee $GITHUB_STEP_SUMMARY
- name: Upload Ruby runtime archive to S3 dry run
if: (inputs.dry_run)
run: aws s3 sync ./output "s3://${S3_BUCKET}" --dryrun
- name: Upload Ruby runtime archive to S3 production
if: (!inputs.dry_run)
run: aws s3 sync ./output "s3://${S3_BUCKET}"