Skip to content

trigger release v0.33.0.0 #44

trigger release v0.33.0.0

trigger release v0.33.0.0 #44

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
version: ${{ steps.get_version.outputs.VERSION }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Required Tools
run: |
sudo apt-get update
sudo apt-get install -y z3
- name: Compute Cache Key
id: cache_key
run: |
key=$(cat stack.yaml stack.yaml.lock package.yaml | sha256sum | cut -d ' ' -f1)
echo "key=$key" >> $GITHUB_ENV
- name: Cache Stack Dependencies
uses: actions/cache@v3
with:
path: |
~/.stack
!~/.stack/programs
./.stack-work
key: ${{ runner.os }}-stack-${{ env.key }}
restore-keys: |
${{ runner.os }}-stack-${{ hashFiles('stack.yaml', 'stack.yaml.lock', 'package.yaml') }}
${{ runner.os }}-stack-
- name: Setup Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: '9.6.3'
enable-stack: 'true'
stack-version: 'latest'
- name: Install Dependencies
run: stack build --only-dependencies
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
draft: false
prerelease: false
build:
name: Build and Upload Release Asset
needs: create_release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
~/.stack
!~/.stack/programs
./.stack-work
key: ${{ needs.create_release.outputs.cache_key }}
restore-keys: |
${{ runner.os }}-stack-${{ hashFiles('stack.yaml', 'stack.yaml.lock', 'package.yaml') }}
${{ runner.os }}-stack-
- name: Install Required Tools
run: |
sudo apt-get update
sudo apt-get install -y ruby ruby-dev rubygems build-essential z3
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: Install Dependencies
run: stack build --only-dependencies
- 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
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.build_package.outputs.package_path }}