name: Building binaries on: # Runs on pushes targeting the default branch push: branches: - main # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: # Build job build: strategy: matrix: os: ["ubuntu-22.04"] version: ["3.3.6", "3.3.5", "3.2.6", "3.2.0", "3.1.6", "3.0.6"] runs-on: ${{ matrix.os }} steps: - name: checkout pages uses: actions/checkout@v4 with: ref: "pages" path: "pages" - name: setup and package Ruby run: | apt-get update && \ apt-get install curl wget tar build-essential zlib1g-dev gpg -y && \ 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 }} && \ mkdir -p pages/$(cut -d '-' -f0 << "${{ matrix.os }}")/$(cut -d '-' -f1 << "${{ matrix.os }}") && \ mv ruby-${{ matrix.version }}-*.tar.bz2 pages/$(cut -d '-' -f0 << "${{ matrix.os }}")/$(cut -d '-' -f1 << "${{ matrix.os }}")/ - name: push binaries run: | cd pages && \ git config user.name "${{ gitea.actor }}" && \ git config user.email ""${{ gitea.actor }}"@noreply.git.morlana.online" && \ git add . && \ git commit -m "ruby ${{ matrix.version }} build for ${{ matrix.os }} from Action ${GITHUB_SHA}" && \ git push