Skip to content

Release process

Release process #10

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-amd64:
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 --artifact +release-static/lucky ./lucky
- name: Package build
run: |
tar -czvf lucky-linux-amd64.tar.gz ./lucky
- uses: actions/upload-artifact@v4
with:
name: lucky-linux-amd64
path: lucky-linux-amd64.tar.gz
if-no-files-found: error
build-windows-amd64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: crystal-lang/install-crystal@v1
- uses: ilammy/msvc-dev-cmd@v1
- name: Run build
run: |
shards build lucky --without-development --no-debug --release --static
- name: Package build
run: |
Compress-Archive .\bin\lucky.exe lucky-windows-amd64.zip
- uses: actions/upload-artifact@v4
with:
name: lucky-windows-amd64
path: lucky-windows-amd64.zip
if-no-files-found: error