6
6
- ' *-hackage'
7
7
8
8
jobs :
9
- check :
9
+ check-and-upload-tarballs :
10
10
runs-on : ubuntu-latest
11
11
strategy :
12
12
matrix :
@@ -69,12 +69,12 @@ jobs:
69
69
echo ::set-output name=path::$(ls ./sdist/${{ matrix.package }}-*)
70
70
71
71
- name : " Unpack package source in an isolated location"
72
- run : cabal unpack ${{ steps.generate-dist-tarball.outputs.path }} --destdir=./packages
72
+ run : cabal unpack ${{ steps.generate-dist-tarball.outputs.path }} --destdir=./incoming
73
73
74
74
- name : " Try to get the current hackage version"
75
75
id : get-hackage-version
76
76
run : |
77
- cd ./packages
77
+ cd ./incoming
78
78
if cabal get $(ls -d ${{ matrix.package }}-*) --destdir=../current; then
79
79
echo ::set-output name=exists::true
80
80
fi
@@ -84,26 +84,26 @@ jobs:
84
84
if : steps.get-hackage-version.exists == 'true'
85
85
run : |
86
86
# This will throw an error if there is any difference casue we have to bump up the package version
87
- diff -qr -x "*.md" -x "data" $(ls -d ./packages /${{ matrix.package }}-*) $(ls -d ./current/${{ matrix.package }}-*)
87
+ diff -qr -x "*.md" -x "data" $(ls -d ./incoming /${{ matrix.package }}-*) $(ls -d ./current/${{ matrix.package }}-*)
88
88
89
89
- name : " Create appropiate cabal.project"
90
90
if : steps.get-hackage-version.exists != 'true'
91
91
run : |
92
- cd $(ls -d ./packages /${{ matrix.package }}-*)
92
+ cd $(ls -d ./incoming /${{ matrix.package }}-*)
93
93
echo "packages: . ../../* ../../plugins/*" > cabal.project
94
94
# TODO: remove when not needed
95
95
echo "allow-newer: Chart-diagrams:diagrams-core, SVGFonts:diagrams-core" >> cabal.project
96
96
97
97
- name : " Build all package components in isolation"
98
98
if : steps.get-hackage-version.exists != 'true'
99
99
run : |
100
- cd $(ls -d ./packages /${{ matrix.package }}-*)
100
+ cd $(ls -d ./incoming /${{ matrix.package }}-*)
101
101
cabal build --enable-tests --enable-benchmarks
102
102
103
103
- name : " Generate haddock for hackage"
104
104
if : steps.get-hackage-version.exists != 'true'
105
105
run : |
106
- cd $(ls -d ./packages /${{ matrix.package }}-*)
106
+ cd $(ls -d ./incoming /${{ matrix.package }}-*)
107
107
cabal haddock --haddock-for-hackage
108
108
109
109
- name : " Upload package dist tarball"
@@ -113,3 +113,15 @@ jobs:
113
113
name : ${{ matrix.package }}
114
114
path : ${{ steps.generate-dist-tarball.outputs.path }}
115
115
116
+ upload-candidate :
117
+ needs : check-and-upload-tarballs
118
+ runs-on : ubuntu-latest
119
+ steps :
120
+
121
+ - uses : actions/download-artifact@v2
122
+
123
+ - name : " Upload all tarballs to hackage"
124
+ uses : haskell-actions/hackage-publish@v1
125
+ with :
126
+ hackageToken : ${{ secrets.HACKAGE_AUTH_TOKEN }}
127
+ publish : false
0 commit comments