Skip to content

Commit b646d28

Browse files
authored
Merge pull request #5 from danslapman/feature/release-binaries
Release binaries for tags
2 parents f598305 + 4e7a1d1 commit b646d28

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,32 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7+
name: Build
78
runs-on: ${{ matrix.os }}
89
strategy:
910
matrix:
10-
os: [ubuntu-latest, macOS-latest, windows-latest]
11+
include:
12+
- os: ubuntu-latest
13+
artifact_name: json2csv
14+
asset_name: json2csv-linux-amd64
15+
- os: windows-latest
16+
artifact_name: json2csv.exe
17+
asset_name: json2csv-windows-amd64
18+
- os: macos-latest
19+
artifact_name: json2csv
20+
asset_name: json2csv-macos-amd64
1121
steps:
1222
- uses: actions/checkout@v3
1323
- uses: haskell/actions/setup@v2
1424
with:
15-
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
25+
stack-no-global: true
1626
enable-stack: true
1727
stack-version: 'latest'
18-
- run: stack build
28+
- run: stack --local-bin-path target install
29+
- uses: svenstaro/upload-release-action@v2
30+
with:
31+
repo_token: ${{ secrets.GITHUB_TOKEN }}
32+
file: target/${{ matrix.artifact_name }}
33+
asset_name: ${{ matrix.asset_name }}
34+
tag: ${{ github.ref }}
35+
if: ${{ startsWith(github.ref, 'refs/tags/') }}

0 commit comments

Comments
 (0)