Skip to content

Release process

Release process #5

Workflow file for this run

name: Lucky CLI Release
#permissions:
#contents: write
on:
#push:
#tags:
#- "v*.*.*"
#workflow_dispatch:
#inputs:
#branch:
#description: Branch
pull_request: # TODO: only for testing
branches: "*"
jobs:
build-linux-static:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
steps:
- uses: earthly/actions-setup@v1
with:
version: v0.7.8
- uses: actions/checkout@v3
- name: Put back the git branch into git (Earthly uses it for tagging)
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
- name: Earthly version
run: earthly --version
- name: Run build
run: |
earthly --ci +release-static
sudo ls -lAh
- name: Package build
run: |
chown 1000:1000 ./lucky
tar -czvf lucky-linux.tar.gz ./lucky
- uses: actions/upload-artifact@v4
with:
name: lucky-linux
path: lucky-linux.tar.gz
if-no-files-found: error
#build-linux-dynamic:
#uses: ./.github/workflows/reusable-earthly.yml
#with:
#earthly-cmd: +release
#build-mac-dynamic:
#runs-on: macos-latest
#steps:
#- uses: actions/checkout@v3
#- uses: crystal-lang/install-crystal@v1
#- name: Build executable
#run: |
#shards build lucky --without-development --no-debug --release
#- name: Package executable
#run: |
#tar -czvf lucky-darwin.tar.gz -C bin .
#- uses: actions/upload-artifact@v4
#with:
#name: lucky-darwin
#path: lucky-darwin.tar.gz
#if-no-files-found: error
#build-windows-static:
#runs-on: windows-latest
#steps:
#- uses: actions/checkout@v3
#- uses: crystal-lang/install-crystal@v1
#- uses: ilammy/msvc-dev-cmd@v1
#- name: Build binary
#run: shards build lucky --production --no-debug --release
#- uses: actions/upload-artifact@v4
#with:
#name: lucky-windows-static
#path: bin/lucky.exe
#if-no-files-found: error
#retention-days: 7
#build-windows-dynamic:
#if: false
#runs-on: windows-latest
#steps:
#- uses: actions/checkout@v3
#- uses: crystal-lang/install-crystal@v1
#- uses: ilammy/msvc-dev-cmd@v1
#- name: Build binary
#run: shards build lucky --production --no-debug --release
#- uses: actions/upload-artifact@v4
#with:
#name: lucky-windows-dynamic
#path: bin
#if-no-files-found: error
#retention-days: 7