git.iko.soy/typeable/compaREST
on master help sign in
Added artifact uploads (#57)

* Added artifact uploads * Added release uploads

commit0261ac1a83d3cebc1844285b864c05b4cb8dc4a2 authoriko <ilyakooo0@gmail.com> dateFri 21 May 2021, 14:01 (5 years ago) parent4f254f4
2 files changed+34−4
.github/workflows/haskell.yml+26−4 openapi-diff.cabal+8
.github/workflows/haskell.yml+26−4
@@ -7,7 +7,7 @@ on:
77 branches: [master]
88
99jobs:
10− build:
10+ linux-build:
1111 runs-on: ubuntu-latest
1212
1313 steps:
@@ -26,8 +26,30 @@ jobs:
2626 ${{ runner.os }}-build-stack-${{ hashFiles('**/stack.yaml') }}
2727 ${{ runner.os }}-build-stack-
2828 - name: Build
29− run: stack build
29+ run: stack build --ghc-options="-O3 -j" --local-bin-path out --copy-bins --flag openapi-diff:Static
3030 - name: Test
3131 run: stack test --test-arguments='--hide-successes --no-create'
32−# - name: Test
33−# run: stack test
32+ - name: Upload artifact
33+ uses: actions/upload-artifact@v2
34+ with:
35+ name: openapi-diff-linux
36+ path: out/openapi-diff
37+ release:
38+ name: "Release"
39+ if: github.ref == 'refs/heads/master'
40+ runs-on: "ubuntu-latest"
41+ needs: [linux-build]
42+ steps:
43+ - uses: actions/download-artifact@v2
44+ - name: Zip
45+ run: |
46+ chmod +x openapi-diff-linux/openapi-diff
47+ zip openapi-diff-linux openapi-diff-linux/openapi-diff
48+ - uses: "marvinpinto/action-automatic-releases@latest"
49+ with:
50+ repo_token: "${{ secrets.GITHUB_TOKEN }}"
51+ automatic_release_tag: "latest"
52+ prerelease: true
53+ title: "Pre-Release"
54+ files: |
55+ *.zip
openapi-diff.cabal+8
@@ -14,7 +14,15 @@ extra-doc-files: README.md
1414 CHANGELOG.md
1515tested-with: GHC == 8.10.4
1616
17+Flag static
18+ Default: False
19+ Manual: True
20+
1721common common-options
22+ if flag(static)
23+ cc-options: -static
24+ ld-options: -static -pthread
25+ ghc-options: -static
1826 ghc-options: -Wall
1927 -Wcompat
2028 -Widentities