Skip to content

Workflow file for this run

# name: Create release
# on:
# push:
# branches-ignore:
# - 'main'
# jobs:
# build_releases:
# name: Build binary - ${{ matrix.binary_os_suffix }}-${{ matrix.binary_arch_suffix }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# VERSION: ${{ github.ref_name }}
# MESSAGE: "WIP"
# FILENAME: hetzner-k3s-${{ matrix.binary_os_suffix }}-${{ matrix.binary_arch_suffix }}
# strategy:
# matrix:
# include:
# - runs_on_tag: macos-latest
# binary_os_suffix: macos
# binary_arch_suffix: amd64
# - runs_on_tag: macos-14
# binary_os_suffix: macos
# binary_arch_suffix: arm64
# architecture: arm
# - runs_on_tag: ubuntu-22.04
# binary_os_suffix: linux
# binary_arch_suffix: arm64
# arch: aarch64
# distro: alpine_latest
# - runs_on_tag: ubuntu-22.04
# binary_os_suffix: linux
# binary_arch_suffix: amd64
# arch: none
# distro: none
# base_image: amd64/alpine
# runs-on: ${{ matrix.runs_on_tag }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# set-safe-directory: '/home/runner/work/hetzner-k3s/hetzner-k3s'
# - if: matrix.binary_os_suffix == 'macos'
# name: macos build step
# run: |
# brew install crystal libssh2 openssl@3
# shards install --without-development
# crystal build src/hetzner-k3s.cr --release
# chmod +x hetzner-k3s
# cp hetzner-k3s ${{ env.FILENAME }}
# - if: matrix.binary_os_suffix == 'linux'
# uses: uraimo/run-on-arch-action@v2
# name: linux build step
# with:
# arch: ${{ matrix.arch }}
# distro: ${{ matrix.distro }}
# base_image: ${{ matrix.base_image }}
# shell: /bin/sh
# install: |
# apk update
# apk add --update --no-cache gcc gmp-dev libevent-static musl-dev pcre-dev pcre2-dev libxml2-dev \
# libxml2-static openssl-dev openssl-libs-static tzdata yaml-static zlib-static xz-static \
# make git autoconf automake libtool patch libssh2-static libssh2-dev crystal shards
# run: |
# shards install --without-development
# crystal build src/hetzner-k3s.cr --release --static
# cp hetzner-k3s ${{ env.FILENAME }}
# - name: Publish new version
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ env.GITHUB_TOKEN }}
# file: ${{ env.FILENAME }}
# tag: ${{ env.VERSION }}
# overwrite: true
# body: ${{ env.MESSAGE }}