@@ -15,127 +15,126 @@ jobs:
1515 run: |
1616 make debpkg
1717 mkdir linux-release-candidate
18− cp linux/artifacts/*.deb linux-release-candidate/
19− cp linux/artifacts/*.tar.gz linux-release-candidate/
18+ mv linux/artifacts/* linux-release-candidate/
2019 - uses: actions/upload-artifact@v2
2120 with:
2221 name: linux-release-candidate
2322 path: linux-release-candidate
2423
25− windows:
26−
27− runs-on: windows-2019
28− strategy:
29− fail-fast: true
30− matrix:
31− versions:
32− - osarch: "windows-x86_64"
33− arch: "x64"
34− choco_opts: ""
35− stack_opts: "-j1"
36− - osarch: "windows-i386"
37− arch: "x86"
38− choco_opts: "--x86 --version 2.1.3.20190715"
39− stack_opts: "-j1 --flag hslua:lua_32bits"
40− # we use stack 2.1.3 because 2.3.1 doesn't support i386
41−
42− steps:
43− - uses: actions/checkout@v1
44− - name: Install stack
45− shell: cmd
46− run: |
47− choco install haskell-stack ${{ matrix.versions.choco_opts }}
48− - name: Install dependencies
49− run: |
50− stack update
51− stack build ${{ matrix.versions.stack_opts }} --dependencies-only pandoc pandoc-citeproc
52− - name: Create windows package
53− shell: cmd
54− run: |
55− for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
56− stack build ${{ matrix.versions.stack_opts }} pandoc pandoc-citeproc
57− for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
58− @set VERSION=%%b
59− goto :next
60− )
61− :next
62− if "%VERSION%" == "" (
63− echo Error: could not determine version number.
64− exit /b 1
65− )
66− echo Detected version %VERSION%
67− @set WINDOWS=%CD%\windows
68− @set RELEASE=%WINDOWS%\pandoc-%VERSION%
69− mkdir %RELEASE%
70− forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%RELEASE%%"
71− stack exec pandoc -- -s --toc MANUAL.txt -o %RELEASE%\MANUAL.html
72− stack exec pandoc -- -s COPYING.md -t rtf -o %RELEASE%\COPYING.rtf
73− copy %RELEASE%\COPYING.rtf %WINDOWS%
74− copy COPYRIGHT %RELEASE%\COPYRIGHT.txt
75− cd windows
76− echo Creating msi...
77− dir
78− @set WIXBIN="c:\Program Files (x86)\WiX Toolset v3.11\bin"
79− @set WORKDIR=%CD%
80− echo Running candle...
81− %WIXBIN%\candle -arch ${{ matrix.versions.arch }} -dVERSION=%VERSION% -dBINPATH=%RELEASE% *.wxs -out wixobj\
82− if %errorlevel% neq 0 exit /b %errorlevel%
83− echo Running light...
84− %WIXBIN%\light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out %WORKDIR%\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi wixobj\*.wixobj
85− 7z a "pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip" pandoc-%VERSION%
86− cd ..
87− mkdir windows-release-candidate
88− copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi windows-release-candidate
89− copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip windows-release-candidate
90− copy windows\Makefile windows-release-candidate
91− - uses: actions/upload-artifact@v2
92− with:
93− name: windows-release-candidate
94− path: windows-release-candidate
95−
96− macos:
97−
98− runs-on: macOS-10.15
99−
100− steps:
101− - uses: actions/checkout@v1
102− - name: Install stack
103− run: |
104− curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
105− tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
106− - name: Install dependencies
107− run: |
108− ./stack update
109− ./stack build --dependencies-only pandoc pandoc-citeproc
110− - name: Create macOS package
111− run: |
112− export VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
113− export BASEDIR=$(pwd)
114− export ARTIFACTS=${BASEDIR}/macos-release-candidate
115− export RESOURCES=${ARTIFACTS}/Resources
116− export ROOT=${ARTIFACTS}/pandoc
117− export DEST=${ROOT}/usr/local
118− export ME=$(whoami)
119− export BASE=pandoc-$VERSION
120− mkdir -p ${ARTIFACTS}
121− mkdir -p ${RESOURCES}
122− mkdir -p ${DEST}/bin
123− mkdir -p ${DEST}/share/man/man1
124− ./stack build pandoc pandoc-citeproc
125− for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${DEST}/bin/; done
126− strip ${DEST}/bin/pandoc
127− strip ${DEST}/bin/pandoc-citeproc
128− cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.1
129− ${DEST}/bin/pandoc-citeproc --man > \
130− $DEST/share/man/man1/pandoc-citeproc.1
131− ${DEST}/bin/pandoc -t html5 -s COPYING.md -Vpagetitle=License \
132− -o ${RESOURCES}/license.html
133− chown -R $ME:staff ${ROOT}
134− sed -e "s/PANDOCVERSION/${VERSION}/" macos/distribution.xml.in > ${ARTIFACTS}/distribution.xml
135− cp macos/Makefile ${ARTIFACTS}/
136− echo ${VERSION} > ${ARTIFACTS}/version.txt
137− - uses: actions/upload-artifact@v2
138− with:
139− name: macos-release-candidate
140− path: macos-release-candidate
141−
24+# windows:
25+#
26+# runs-on: windows-2019
27+# strategy:
28+# fail-fast: true
29+# matrix:
30+# versions:
31+# - osarch: "windows-x86_64"
32+# arch: "x64"
33+# choco_opts: ""
34+# stack_opts: "-j1"
35+# - osarch: "windows-i386"
36+# arch: "x86"
37+# choco_opts: "--x86 --version 2.1.3.20190715"
38+# stack_opts: "-j1 --flag hslua:lua_32bits"
39+# # we use stack 2.1.3 because 2.3.1 doesn't support i386
40+#
41+# steps:
42+# - uses: actions/checkout@v1
43+# - name: Install stack
44+# shell: cmd
45+# run: |
46+# choco install haskell-stack ${{ matrix.versions.choco_opts }}
47+# - name: Install dependencies
48+# run: |
49+# stack update
50+# stack build ${{ matrix.versions.stack_opts }} --dependencies-only pandoc pandoc-citeproc
51+# - name: Create windows package
52+# shell: cmd
53+# run: |
54+# for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
55+# stack build ${{ matrix.versions.stack_opts }} pandoc pandoc-citeproc
56+# for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
57+# @set VERSION=%%b
58+# goto :next
59+# )
60+# :next
61+# if "%VERSION%" == "" (
62+# echo Error: could not determine version number.
63+# exit /b 1
64+# )
65+# echo Detected version %VERSION%
66+# @set WINDOWS=%CD%\windows
67+# @set RELEASE=%WINDOWS%\pandoc-%VERSION%
68+# mkdir %RELEASE%
69+# forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%RELEASE%%"
70+# stack exec pandoc -- -s --toc MANUAL.txt -o %RELEASE%\MANUAL.html
71+# stack exec pandoc -- -s COPYING.md -t rtf -o %RELEASE%\COPYING.rtf
72+# copy %RELEASE%\COPYING.rtf %WINDOWS%
73+# copy COPYRIGHT %RELEASE%\COPYRIGHT.txt
74+# cd windows
75+# echo Creating msi...
76+# dir
77+# @set WIXBIN="c:\Program Files (x86)\WiX Toolset v3.11\bin"
78+# @set WORKDIR=%CD%
79+# echo Running candle...
80+# %WIXBIN%\candle -arch ${{ matrix.versions.arch }} -dVERSION=%VERSION% -dBINPATH=%RELEASE% *.wxs -out wixobj\
81+# if %errorlevel% neq 0 exit /b %errorlevel%
82+# echo Running light...
83+# %WIXBIN%\light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out %WORKDIR%\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi wixobj\*.wixobj
84+# 7z a "pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip" pandoc-%VERSION%
85+# cd ..
86+# mkdir windows-release-candidate
87+# copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi windows-release-candidate
88+# copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip windows-release-candidate
89+# copy windows\Makefile windows-release-candidate
90+# - uses: actions/upload-artifact@v2
91+# with:
92+# name: windows-release-candidate
93+# path: windows-release-candidate
94+#
95+# macos:
96+#
97+# runs-on: macOS-10.15
98+#
99+# steps:
100+# - uses: actions/checkout@v1
101+# - name: Install stack
102+# run: |
103+# curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
104+# tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
105+# - name: Install dependencies
106+# run: |
107+# ./stack update
108+# ./stack build --dependencies-only pandoc pandoc-citeproc
109+# - name: Create macOS package
110+# run: |
111+# export VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
112+# export BASEDIR=$(pwd)
113+# export ARTIFACTS=${BASEDIR}/macos-release-candidate
114+# export RESOURCES=${ARTIFACTS}/Resources
115+# export ROOT=${ARTIFACTS}/pandoc
116+# export DEST=${ROOT}/usr/local
117+# export ME=$(whoami)
118+# export BASE=pandoc-$VERSION
119+# mkdir -p ${ARTIFACTS}
120+# mkdir -p ${RESOURCES}
121+# mkdir -p ${DEST}/bin
122+# mkdir -p ${DEST}/share/man/man1
123+# ./stack build pandoc pandoc-citeproc
124+# for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${DEST}/bin/; done
125+# strip ${DEST}/bin/pandoc
126+# strip ${DEST}/bin/pandoc-citeproc
127+# cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.1
128+# ${DEST}/bin/pandoc-citeproc --man > \
129+# $DEST/share/man/man1/pandoc-citeproc.1
130+# ${DEST}/bin/pandoc -t html5 -s COPYING.md -Vpagetitle=License \
131+# -o ${RESOURCES}/license.html
132+# chown -R $ME:staff ${ROOT}
133+# sed -e "s/PANDOCVERSION/${VERSION}/" macos/distribution.xml.in > ${ARTIFACTS}/distribution.xml
134+# cp macos/Makefile ${ARTIFACTS}/
135+# echo ${VERSION} > ${ARTIFACTS}/version.txt
136+# - uses: actions/upload-artifact@v2
137+# with:
138+# name: macos-release-candidate
139+# path: macos-release-candidate
140+#