From 1cd5829a0cf825b73d28cf8f7cf916a8443a54dd Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 10 Mar 2023 09:23:16 -0800 Subject: Factor out make_macos_release.sh from the release candidate workflow. Also use cabal instead of stack to build the macos binary. --- .github/workflows/release-candidate.yml | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) (limited to '.github') diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index fe48c34e6..dd71748ca 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -90,35 +90,9 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Build executable + - name: Create release run: | - stack --no-terminal setup - stack --no-terminal update - stack --no-terminal install --ghc-options='-j4 +RTS -A256m -RTS -split-sections' - - - name: Create artifacts - run: | - export VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $2;}') - export ARTIFACTS=macos-release-candidate - export RESOURCES=${ARTIFACTS}/Resources - export ROOT=${ARTIFACTS}/pandoc - export DEST=${ROOT}/usr/local - export ME=$(whoami) - export BASE=pandoc-$VERSION - mkdir -p ${ARTIFACTS} - mkdir -p ${RESOURCES} - mkdir -p ${DEST}/bin - mkdir -p ${DEST}/share/man/man1 - cp ~/.local/bin/pandoc ${DEST}/bin/ - strip ${DEST}/bin/pandoc - cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.1 - cp man/pandoc-server.1 ${DEST}/share/man/man1/pandoc-server.1 - cp man/pandoc-lua.1 ${DEST}/share/man/man1/pandoc-lua.1 - ~/.local/bin/pandoc -s COPYING.md -Vpagetitle=License -o ${RESOURCES}/license.html - chown -R $ME:staff ${ROOT} - sed -e "s/PANDOCVERSION/${VERSION}/" macos/distribution.xml.in > ${ARTIFACTS}/distribution.xml - cp macos/Makefile ${ARTIFACTS}/ - echo ${VERSION} > ${ARTIFACTS}/version.txt + sh macos/make_macos_release.sh - uses: actions/upload-artifact@v3 with: -- cgit v1.2.3