@@ -0,0 +1,101 @@
10+ runs-on: ubuntu-latest
12+ - uses: actions/checkout@v1
13+ - name: Install recent cabal/ghc
15+ sudo add-apt-repository ppa:hvr/ghc
17+ sudo apt-get install ghc-8.6.5 cabal-install-2.4
18+ - name: Install dependencies
20+ export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
22+ cabal v2-build --dependencies-only --enable-tests . pandoc-citeproc
23+ - name: Build and test
25+ export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
26+ cabal v2-install --enable-tests --run-tests . pandoc-citeproc
27+ - name: Install artifact
29+ export ARTIFACTS=./pandoc-nightly-linux-$(date +%Y-%m%-d)-${GITHUB_SHA}
30+ mkdir -p ${ARTIFACTS}
31+ for f in $(find dist-newstyle -name 'pandoc*' -type f -executable); do cp $f ${ARTIFACTS}/; done
32+ cp COPYRIGHT ${ARTIFACTS}/
33+ tar cvzf nightly-linux.tgz ${ARTIFACTS}
34+ - uses: actions/upload-artifact@master
36+ name: nightly-linux-x86_64
37+ path: nightly-linux-x86_64.tgz
41+ runs-on: windows-latest
44+ - uses: actions/checkout@v1
45+ - name: Install stack
48+ choco install haskell-stack
49+ - name: Install dependencies
52+ stack test --dependencies-only pandoc pandoc-citeproc
53+ - name: Build and test
56+ stack install --test pandoc pandoc-citeproc
57+ - name: Install artifact
59+ for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
60+ set ARTIFACTS=pandoc-nightly-windows-$(date +%Y-%m%-d)-${GITHUB_SHA}
62+ copy %BINPATH%\pandoc.exe %ARTIFACTS%/
63+ copy %BINPATH%\pandoc-citeproc.exe %ARTIFACTS%/
64+ copy COPYRIGHT %ARTIFACTS%/COPYRIGHT.txt
65+ 7z a nightly-windows.zip %ARTIFACTS%
66+ - uses: actions/upload-artifact@master
68+ name: nightly-windows
69+ path: nightly-windows.tgz
73+ runs-on: macOS-latest
76+ - uses: actions/checkout@v1
77+ - name: Install stack
79+ curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
80+ tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
81+ - name: Install dependencies
84+ ./stack test --dependencies-only pandoc pandoc-citeproc
85+ - name: Build and test
87+ ./stack install --test pandoc pandoc-citeproc
88+ - name: Install artifact
90+ export ARTIFACTS=./pandoc-nightly-macos-$(date +%Y-%m%-d)-${GITHUB_SHA}
91+ mkdir -p ${ARTIFACTS}
92+ cp $HOME/.local/bin/pandoc ${ARTIFACTS}/
93+ cp $HOME/.local/bin/pandoc-citeproc ${ARTIFACTS}/
94+ cp COPYRIGHT ${ARTIFACTS}/
95+ for f in $(find dist-newstyle -name 'pandoc*' -type f -executable); do cp $f ${ARTIFACTS}/; done
96+ zip -r nightly-macos.zip ${ARTIFACTS}
97+ - uses: actions/upload-artifact@master
100+ path: nightly-macos.zip