Skip to content

Build and upload JRuby 9.4.9.0 (dry run) #3

Build and upload JRuby 9.4.9.0 (dry run)

Build and upload JRuby 9.4.9.0 (dry run) #3

Workflow file for this run

name: Build and upload JRuby runtime
run-name: "Build and upload JRuby ${{ inputs.jruby_version }}${{ inputs.dry_run && ' (dry run)' || '' }}"
on:
workflow_dispatch:
inputs:
jruby_version:
description: "The JRuby version to build, specified as X.Y.Z (i.e. 9.4.7.0)"
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-and-upload:
runs-on: pub-hk-ubuntu-24.04-xlarge
strategy:
fail-fast: false
matrix:
base_image: ["heroku-20", "heroku-22", "heroku-24"]
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 jruby_changelog -- --version "${{inputs.jruby_version}}"
- name: Build Ruby
run: cargo run --bin jruby_build -- --version ${{inputs.jruby_version}} --base-image ${{matrix.base_image}} \
- name: Check Ruby
run: cargo run --bin jruby_check -- --version ${{inputs.jruby_version}} --base-image ${{matrix.base_image}} --arch amd64 | 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}"
after-build-and-upload:
needs: build-and-upload
runs-on: pub-hk-ubuntu-24.04-xlarge
steps:
- name: Update Jruby inventory file locally
uses: peter-evans/create-pull-request@v6
with:
path: jruby_inventory.toml
title: "Add JRuby ${{inputs.jruby_version}} to inventory"