Skip to content

Commit

Permalink
Temp disable release workflow as that's still for Crystal
Browse files Browse the repository at this point in the history
  • Loading branch information
vitobotta committed Apr 13, 2024
1 parent 7451e93 commit 6bc78b3
Showing 1 changed file with 73 additions and 73 deletions.
146 changes: 73 additions & 73 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
name: Create release
# name: Create release

on:
push:
branches-ignore:
- 'main'
# on:
# push:
# branches-ignore:
# - 'main'

jobs:
# 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 }}
# 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
# 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 }}
# 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'
# 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 == '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 }}
# - 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
# 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
# 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 }}
# 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 }}
# - 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 }}

0 comments on commit 6bc78b3

Please sign in to comment.