-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.18 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: json2csv
asset_name: json2csv-linux-amd64
- os: windows-latest
artifact_name: json2csv.exe
asset_name: json2csv-windows-amd64.exe
- os: macos-13
artifact_name: json2csv
asset_name: json2csv-macos-amd64
- os: macos-latest
artifact_name: json2csv
asset_name: json2csv-macos-arm
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
stack-no-global: true
enable-stack: true
stack-version: 'latest'
- run: stack test
- run: stack --local-bin-path target install
if: ${{ startsWith(github.ref, 'refs/tags/') }}
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
if: ${{ startsWith(github.ref, 'refs/tags/') }}