-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.68 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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:
- uses: actions/checkout@v4
- name: Setup Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: '9.6.6'
enable-stack: 'true'
stack-version: 'latest'
- name: Cache Stack dependencies
uses: actions/cache@v3
with:
path: |
~/.stack
!~/.stack/programs
./.stack-work
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml', 'package.yaml') }}
- name: Install fpm
run: |
sudo apt-get update
sudo apt-get install -y ruby ruby-dev rubygems build-essential
sudo gem install --no-document fpm
- 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 }}