@@ -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