Skip to content

build

build #30

Workflow file for this run

name: build
on:
repository_dispatch:
types: [build]
workflow_dispatch:
inputs:
ruby_version:
description: 'Ruby versions to build'
required: true
default: '3.3.4'
jobs:
build:
name: build with snapcraft
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- platform: amd64
os: ubuntu-24.04
- platform: arm64
os: ubuntu-24.04-arm
# - platform: armhf
# os: ubuntu-24.04-arm
steps:
- name: Check out Git repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Store Ruby version
run: |
echo "RUBY_VERSION=${{ github.event.client_payload.ruby_version || github.event.inputs.ruby_version }}" >> $GITHUB_ENV
- name: Generate template file
run: ruby generate.rb ${{ env.RUBY_VERSION }}
- uses: snapcore/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79 # v1.3.0
id: snapcraft
with:
snapcraft-args: --target-arch=${{ matrix.platform }} --enable-experimental-target-arch
- name: Store ABI version
run: echo "ABI_VERSION=$(echo ${{ env.RUBY_VERSION }} | cut -d '.' -f 1-2)" >> $GITHUB_ENV
- uses: snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40 # v1.2.0
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
with:
snap: ${{ steps.snapcraft.outputs.snap }}
release: ${{ env.ABI_VERSION }}/edge
build-armhf:
name: build armhf with snapcraft
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Store Ruby version
run: |
echo "RUBY_VERSION=${{ github.event.client_payload.ruby_version || github.event.inputs.ruby_version }}" >> $GITHUB_ENV
- name: Generate template file
run: ruby generate.rb ${{ env.RUBY_VERSION }}
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- uses: diddlesnaps/snapcraft-multiarch-action@cfd7a246fad6bea65bb92f69a1c8d07898c231e5 # v1.9.0
id: snapcraft
with:
architecture: armhf
- name: Store ABI version
run: echo "ABI_VERSION=$(echo ${{ env.RUBY_VERSION }} | cut -d '.' -f 1-2)" >> $GITHUB_ENV
- uses: snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40 # v1.2.0
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
with:
snap: ${{ steps.snapcraft.outputs.snap }}
release: ${{ env.ABI_VERSION }}/edge