All checks were successful
Build and publish Ruby binaries / build (ubuntu-22.04, 3.4.2) (push) Successful in 21m19s
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
name: Build and publish Ruby binaries
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
schedule:
|
|
- cron: '0 1 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: ["ubuntu-22.04"]
|
|
version: ["3.4.2"]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
# 1) Code auschecken
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
# 2) System-Dependencies installieren
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y curl wget tar build-essential zlib1g-dev gpg
|
|
|
|
# 3) RVM installieren & Ruby bauen
|
|
- name: Install RVM & build Ruby
|
|
run: |
|
|
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
|
|
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
|
|
curl -sSL https://get.rvm.io | bash -s stable
|
|
source /etc/profile.d/rvm.sh
|
|
rvm get head
|
|
rvm install ${{ matrix.version }}
|
|
ruby -v
|
|
rvm prepare ${{ matrix.version }}
|
|
|
|
# 4) Binaries paketieren
|
|
- name: Package Ruby binaries
|
|
run: |
|
|
# passe /usr/local/rvm/rubies/... ggf. an dein Install-Verzeichnis an
|
|
tar -cjf ruby-${{ matrix.version }}.tar.bz2 \
|
|
-C /usr/local/rvm/rubies/ruby-${{ matrix.version }} .
|
|
|
|
# 5) Upload per Gitea-Action
|
|
- name: Publish Generic Package to Gitea
|
|
# verwendet die offizielle Gitea-Package-Publish-Action
|
|
uses: VAllens/gitea-publish-generic-packages@v1
|
|
with:
|
|
# falls du eine abweichende API-URL brauchst, sonst weg lassen
|
|
owner: ${{ github.repository_owner }}
|
|
package_name: ruby-${{ matrix.os }}-aarch64
|
|
package_version: ${{ matrix.version }}
|
|
token: ${{ secrets.PACKAGES_TOKEN }}
|
|
files: |
|
|
ruby-${{ matrix.version }}.tar.bz2
|