mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-04-26 21:45:15 +00:00
5f7fe8b0dc
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- stable
|
|
tags:
|
|
- "v*"
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Clone project
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Stack
|
|
uses: haskell/actions/setup@v1
|
|
with:
|
|
ghc-version: '8.8.4'
|
|
enable-stack: true
|
|
stack-version: 'latest'
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.stack
|
|
key: ${{ hashFiles('stack.yaml') }}
|
|
|
|
- name: Build & test
|
|
id: build_test
|
|
run: |
|
|
stack build --test --force-dirty
|
|
install_root=$(stack path --local-install-root)
|
|
mv ${install_root}/bin/smp-server smp-server-ubuntu-20_04-x86-64
|
|
|
|
- name: Build changelog
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
id: build_changelog
|
|
uses: mikepenz/release-changelog-builder-action@v1
|
|
with:
|
|
configuration: .github/changelog_conf.json
|
|
failOnError: true
|
|
ignorePreReleases: true
|
|
commitMode: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Create release
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
body: |
|
|
See full changelog [here](https://github.com/simplex-chat/simplexmq/blob/master/CHANGELOG.md).
|
|
Commits, chronological:
|
|
${{ steps.build_changelog.outputs.changelog }}
|
|
files: |
|
|
LICENSE
|
|
smp-server-ubuntu-20_04-x86-64
|
|
fail_on_unmatched_files: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|