Skip to content

Prepare for release v0.44.0.0 #57

Prepare for release v0.44.0.0

Prepare for release v0.44.0.0 #57

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version to simulate (without v prefix)'
required: true
default: '1.0.0-test'
skip_publish:
description: 'Skip actual publishing of release'
type: boolean
default: true
jobs:
release:
name: Build and Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Version from Tag or Input
id: get_version
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
echo "TESTING=true" >> $GITHUB_OUTPUT
else
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "TESTING=false" >> $GITHUB_OUTPUT
fi
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y z3 ruby ruby-dev rubygems build-essential
sudo gem install --no-document fpm
- name: Setup Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: '9.6.3'
enable-stack: 'true'
stack-version: 'latest'
- name: Cache Stack
uses: actions/cache@v3
id: cache-stack
with:
path: |
~/.stack
./.stack-work
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml', 'stack.yaml.lock', 'package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-
- name: Install Dependencies
if: steps.cache-stack.outputs.cache-hit != 'true'
run: stack build --only-dependencies
- name: Create GitHub Release
id: create_release
if: github.event.inputs.skip_publish != 'true'
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
draft: false
prerelease: false
tag_name: v${{ steps.get_version.outputs.VERSION }}
- name: Build and Package
id: build_package
run: |
chmod +x ./reposcripts/package.sh
PACKAGE_PATH=$(./reposcripts/package.sh | tail -n1)
echo "package_path=$PACKAGE_PATH" >> $GITHUB_OUTPUT
echo "Package path: $PACKAGE_PATH"
- name: Upload Release Asset
if: github.event.inputs.skip_publish != 'true'
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.build_package.outputs.package_path }}
tag_name: v${{ steps.get_version.outputs.VERSION }}
- name: Output Results (Test Mode)
if: steps.get_version.outputs.TESTING == 'true'
run: |
echo "🧪 WORKFLOW TEST COMPLETED 🧪"
echo "✅ Build completed successfully"
echo "📦 Package created at: ${{ steps.build_package.outputs.package_path }}"
echo "🔖 Simulated version: v${{ steps.get_version.outputs.VERSION }}"
if [[ "${{ github.event.inputs.skip_publish }}" == "true" ]]; then
echo "⏭️ Publishing was skipped (test mode)"
else
echo "📢 Publishing was executed"
fi