@@ -0,0 +1,96 @@
1+name: Release candidate
2+
3+on:
4+ push:
5+ branches:
6+ - 'rc/**'
7+
8+jobs:
9+ linux:
10+
11+ runs-on: ubuntu-latest
12+ steps:
13+ - uses: actions/checkout@v1
14+ - name: Create linux package
15+ run: |
16+ make debpkg
17+ - uses: actions/upload-artifact@master
18+ with:
19+ name: linux-release-candidate
20+ path: linux-artifacts
21+
22+ windows:
23+
24+ runs-on: windows-latest
25+
26+ steps:
27+ - uses: actions/checkout@v1
28+ - name: Install stack
29+ shell: cmd
30+ run: |
31+ choco install haskell-stack
32+ - name: Install dependencies
33+ run: |
34+ stack update
35+ stack build --dependencies-only pandoc pandoc-citeproc
36+ - name: Build artifacts
37+ shell: cmd
38+ run: |
39+ for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
40+ stack build pandoc pandoc-citeproc
41+ forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C copy @path windows"
42+ stack exec pandoc -- -s --toc MANUAL.txt -o windows\MANUAL.html
43+ stack exec pandoc -- -s COPYING.md -t rtf -o windows\COPYING.rtf
44+ copy COPYRIGHT windows\COPYRIGHT.txt
45+ cd windows
46+ for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
47+ @set VERSION=%%b
48+ goto :next
49+ )
50+ :next
51+ if "%VERSION%" == "" (
52+ echo Error: could not determine version number.
53+ exit /b 1
54+ )
55+ echo Detected version %VERSION%
56+ echo Creating msi...
57+ candle -dVERSION=%VERSION% -dBINPATH=%BINPATH% *.wxs -out wixobj\
58+ if %errorlevel% neq 0 exit /b %errorlevel%
59+ light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out pandoc-%VERSION%-windows.msi wixobj\*.wixobj
60+ cd ..
61+ mkdir windows-release-candidate
62+ copy windows\pandoc-%VERSION%-windows.msi windows-release-candidate
63+ - uses: actions/upload-artifact@master
64+ with:
65+ name: windows-release-candidate
66+ path: windows-release-candidate
67+
68+# macos:
69+
70+# runs-on: macOS-latest
71+
72+# steps:
73+# - uses: actions/checkout@v1
74+# - name: Install stack
75+# run: |
76+# curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
77+# tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
78+# - name: Install dependencies
79+# run: |
80+# ./stack update
81+# ./stack build --dependencies-only pandoc pandoc-citeproc
82+# - name: Build artifacts
83+# run: |
84+# export ARTIFACTS=nightly-macos/pandoc-nightly-macos-$(date +%Y-%m-%d)
85+# mkdir -p ${ARTIFACTS}
86+# ./stack build pandoc pandoc-citeproc
87+# for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${ARTIFACTS}/; done
88+# mv ${ARTIFACTS}/pandoc ${ARTIFACTS}/pandoc
89+# mv ${ARTIFACTS}/pandoc-citeproc ${ARTIFACTS}/pandoc-citeproc
90+# cp COPYRIGHT ${ARTIFACTS}/
91+# echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
92+# - uses: actions/upload-artifact@master
93+# with:
94+# name: nightly-macos
95+# path: nightly-macos
96+