Skip to content
Snippets Groups Projects
Unverified Commit 1f0249eb authored by Javier Neira's avatar Javier Neira Committed by GitHub
Browse files

Fix hackage release (#2177)

* Do a cabal update

* Set false explicitly

* Correct outputs

* Show entire diff

* Remove duplicate cabal update
parent d9d27e52
No related branches found
No related tags found
No related merge requests found
......@@ -71,23 +71,28 @@ jobs:
- name: "Unpack package source in an isolated location"
run: cabal unpack ${{ steps.generate-dist-tarball.outputs.path }} --destdir=./incoming
- name: "Ensure we will use hackage head"
run: cabal update
- name: "Try to get the current hackage version"
id: get-hackage-version
run: |
cd ./incoming
if cabal get $(ls -d ${{ matrix.package }}-*) --destdir=../current; then
echo ::set-output name=exists::true
else
echo ::set-output name=exists::false
fi
- name: "Compare the incoming and the current hackage version of the package"
id: compare-current-version
if: steps.get-hackage-version.exists == 'true'
if: steps.get-hackage-version.outputs.exists == 'true'
run: |
# This will throw an error if there is any difference cause we have to bump up the package version
diff -qr -x "*.md" -x "data" $(ls -d ./incoming/${{ matrix.package }}-*) $(ls -d ./current/${{ matrix.package }}-*)
diff -r -x "*.md" -x "data" $(ls -d ./incoming/${{ matrix.package }}-*) $(ls -d ./current/${{ matrix.package }}-*)
- name: "Create appropiate cabal.project"
if: steps.get-hackage-version.exists != 'true'
if: steps.get-hackage-version.outputs.exists != 'true'
run: |
cd $(ls -d ./incoming/${{ matrix.package }}-*)
echo "packages: . ../../* ../../plugins/*" > cabal.project
......@@ -95,19 +100,19 @@ jobs:
echo "allow-newer: Chart-diagrams:diagrams-core, SVGFonts:diagrams-core" >> cabal.project
- name: "Build all package components in isolation"
if: steps.get-hackage-version.exists != 'true'
if: steps.get-hackage-version.outputs.exists != 'true'
run: |
cd $(ls -d ./incoming/${{ matrix.package }}-*)
cabal build --enable-tests --enable-benchmarks
- name: "Generate haddock for hackage"
if: steps.get-hackage-version.exists != 'true'
if: steps.get-hackage-version.outputs.exists != 'true'
run: |
cd $(ls -d ./incoming/${{ matrix.package }}-*)
cabal haddock --haddock-for-hackage
- name: "Upload package dist tarball"
if: steps.get-hackage-version.exists != 'true'
if: steps.get-hackage-version.outputs.exists != 'true'
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.package }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment