@@ -9,34 +9,29 @@ on:
99 types: [prereleased]
1010
1111jobs:
12−# check-formatting:
13−# name: Check Haskell formatting
14−# runs-on: ubuntu-latest
15−# steps:
16−# - uses: actions/checkout@v2
17−#
18−# - name: Common setup
19−# uses: ./.github/actions/common_setup
20−# with:
21−# authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
22−#
23−# - name: Run fourmolu
24−# run: |
25−# nix-shell nix/ci.nix -j auto --run "git ls-files '*.hs' | xargs fourmolu -m inplace -o -XRecursiveDo -o -XTypeApplications -o -XPatternSynonyms -o -XBangPatterns"
26−# git diff --exit-code
27−
28− check_versions:
12+ check-formatting:
13+ name: Check Haskell formatting
2914 runs-on: ubuntu-latest
3015 steps:
3116 - uses: actions/checkout@v2
32− with:
33− submodules: recursive
3417
3518 - name: Common setup
3619 uses: ./.github/actions/common_setup
3720 with:
3821 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
3922
23+ - name: Run fourmolu
24+ run: |
25+ nix-shell nix/ci.nix -j auto --run "git ls-files '*.hs' | xargs fourmolu -m inplace -o -XRecursiveDo -o -XTypeApplications -o -XPatternSynonyms -o -XBangPatterns"
26+ git diff --exit-code
27+
28+ check_versions:
29+ runs-on: ubuntu-latest
30+ steps:
31+ - uses: actions/checkout@v2
32+ with:
33+ submodules: recursive
34+
4035 - name: Check library version
4136 if: github.event_name == 'release'
4237 run: |
@@ -159,18 +154,13 @@ jobs:
159154 tag: ${{ github.ref }}
160155
161156 dist:
162− needs: [check_versions, Linux]
157+ needs: check_versions
163158 runs-on: ubuntu-latest
164159 steps:
165160 - uses: actions/checkout@v2
166161 with:
167162 submodules: recursive
168163
169− - name: Common setup
170− uses: ./.github/actions/common_setup
171− with:
172− authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
173−
174164 - name: Cache
175165 uses: actions/cache@v1
176166 with:
@@ -189,7 +179,7 @@ jobs:
189179
190180 - name: Build dist
191181 run: |
192− stack sdist --pvp-bounds both
182+ stack sdist --pvp-bounds both --test-tarball
193183 echo "distPath=$(stack path | awk -F ": " '/dist-dir/ {print $2}')" >> $GITHUB_ENV
194184
195185 - name: Upload compaREST sources artifact
@@ -213,7 +203,7 @@ jobs:
213203 env:
214204 HACKAGE_KEY: ${{ secrets.HACKAGE_KEY }}
215205 run: |
216− stack upload --pvp-bounds both --candidate .
206+ stack upload --pvp-bounds both --test-tarball --candidate .
217207
218208 macOS:
219209 needs: check_versions
@@ -252,39 +242,39 @@ jobs:
252242 file: compaREST-macOS-x86.zip
253243 tag: ${{ github.ref }}
254244
255−# Linux-Windows:
256−# needs: check_versions
257−# runs-on: ubuntu-latest
258−# steps:
259−# - uses: actions/checkout@v2
260−# with:
261−# submodules: recursive
262−#
263−# - name: Common setup
264−# uses: ./.github/actions/common_setup
265−# with:
266−# authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
267−#
268−# - name: Build Windows binary
269−# run: |
270−# cp -LR $(nix-build -A WindowsCompaRESTBin -j auto --no-out-link)/bin compaREST
271−#
272−# - name: Upload Windows compaREST bundle
273−# uses: actions/upload-artifact@v2
274−# with:
275−# name: compaREST binary – Windows
276−# path: compaREST
277−#
278−# - name: Zip Release Assets
279−# if: github.event_name == 'release'
280−# shell: bash
281−# run: |
282−# zip -r compaREST-Windows.zip compaREST
283−#
284−# - name: Upload compaREST binary – Windows to release
285−# if: github.event_name == 'release'
286−# uses: svenstaro/upload-release-action@2.2.1
287−# with:
288−# repo_token: ${{ secrets.GITHUB_TOKEN }}
289−# file: compaREST-Windows.zip
290−# tag: ${{ github.ref }}
245+ Linux-Windows:
246+ needs: check_versions
247+ runs-on: ubuntu-latest
248+ steps:
249+ - uses: actions/checkout@v2
250+ with:
251+ submodules: recursive
252+
253+ - name: Common setup
254+ uses: ./.github/actions/common_setup
255+ with:
256+ authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
257+
258+ - name: Build Windows binary
259+ run: |
260+ cp -LR $(nix-build -A WindowsCompaRESTBin -j auto --no-out-link)/bin compaREST
261+
262+ - name: Upload Windows compaREST bundle
263+ uses: actions/upload-artifact@v2
264+ with:
265+ name: compaREST binary – Windows
266+ path: compaREST
267+
268+ - name: Zip Release Assets
269+ if: github.event_name == 'release'
270+ shell: bash
271+ run: |
272+ zip -r compaREST-Windows.zip compaREST
273+
274+ - name: Upload compaREST binary – Windows to release
275+ if: github.event_name == 'release'
276+ uses: svenstaro/upload-release-action@2.2.1
277+ with:
278+ repo_token: ${{ secrets.GITHUB_TOKEN }}
279+ file: compaREST-Windows.zip
280+ tag: ${{ github.ref }}