Skip to content

Release process

Release process #14

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
EARTHLY_CI: 'true'
steps:
- uses: earthly/actions-setup@v1
with:
version: v0.8.0
- uses: actions/checkout@v4
- name: Build and package
run: |
mkdir -p bin
earthly --artifact +release-static/lucky ./bin/lucky
sha256sum ./bin/lucky > ./bin/checksums.txt
tar -czvf lucky-linux-amd64.tar.gz -C ./bin .
- 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: Build and package
run: |
shards build lucky --without-development --no-debug --release --static
(Get-FileHash ./bin/lucky.exe).Hash | Out-File ./bin/checksums.txt
Compress-Archive -Path ./bin/* -DestinationPath lucky-windows-amd64.zip
- uses: actions/upload-artifact@v4
with:
name: lucky-windows-amd64
path: lucky-windows-amd64.zip
if-no-files-found: error
release:
runs-on: ubuntu-latest
needs:
- build-linux-amd64
- build-windows-amd64
steps:
- uses: actions/download-artifact@v4
- name: List artifacts
run: |
ls -lAhR