@@ -71,43 +71,48 @@ jobs:
71
71
- name : " Unpack package source in an isolated location"
72
72
run : cabal unpack ${{ steps.generate-dist-tarball.outputs.path }} --destdir=./incoming
73
73
74
+ - name : " Ensure we will use hackage head"
75
+ run : cabal update
76
+
74
77
- name : " Try to get the current hackage version"
75
78
id : get-hackage-version
76
79
run : |
77
80
cd ./incoming
78
81
if cabal get $(ls -d ${{ matrix.package }}-*) --destdir=../current; then
79
82
echo ::set-output name=exists::true
83
+ else
84
+ echo ::set-output name=exists::false
80
85
fi
81
86
82
87
- name : " Compare the incoming and the current hackage version of the package"
83
88
id : compare-current-version
84
- if : steps.get-hackage-version.exists == 'true'
89
+ if : steps.get-hackage-version.outputs. exists == 'true'
85
90
run : |
86
91
# This will throw an error if there is any difference cause we have to bump up the package version
87
- diff -qr -x "*.md" -x "data" $(ls -d ./incoming/${{ matrix.package }}-*) $(ls -d ./current/${{ matrix.package }}-*)
92
+ diff -r -x "*.md" -x "data" $(ls -d ./incoming/${{ matrix.package }}-*) $(ls -d ./current/${{ matrix.package }}-*)
88
93
89
94
- name : " Create appropiate cabal.project"
90
- if : steps.get-hackage-version.exists != 'true'
95
+ if : steps.get-hackage-version.outputs. exists != 'true'
91
96
run : |
92
97
cd $(ls -d ./incoming/${{ matrix.package }}-*)
93
98
echo "packages: . ../../* ../../plugins/*" > cabal.project
94
99
# TODO: remove when not needed
95
100
echo "allow-newer: Chart-diagrams:diagrams-core, SVGFonts:diagrams-core" >> cabal.project
96
101
97
102
- name : " Build all package components in isolation"
98
- if : steps.get-hackage-version.exists != 'true'
103
+ if : steps.get-hackage-version.outputs. exists != 'true'
99
104
run : |
100
105
cd $(ls -d ./incoming/${{ matrix.package }}-*)
101
106
cabal build --enable-tests --enable-benchmarks
102
107
103
108
- name : " Generate haddock for hackage"
104
- if : steps.get-hackage-version.exists != 'true'
109
+ if : steps.get-hackage-version.outputs. exists != 'true'
105
110
run : |
106
111
cd $(ls -d ./incoming/${{ matrix.package }}-*)
107
112
cabal haddock --haddock-for-hackage
108
113
109
114
- name : " Upload package dist tarball"
110
- if : steps.get-hackage-version.exists != 'true'
115
+ if : steps.get-hackage-version.outputs. exists != 'true'
111
116
uses : actions/upload-artifact@v2
112
117
with :
113
118
name : ${{ matrix.package }}
0 commit comments