Actions/release-candidate/macos: set up to create package locally.

We need to sign the binaries before inserting them into the
package, so this should be done locally.
This commit is contained in:
John MacFarlane 2020-03-22 10:30:45 -07:00
parent 4d3ade0347
commit 9b00526e44

View file

@ -111,14 +111,12 @@ jobs:
export VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
export BASEDIR=$(pwd)
export ARTIFACTS=${BASEDIR}/macos-release-candidate
export DIST=${BASEDIR}/macos_package
export RESOURCES=${ARTIFACTS}/Resources
export ROOT=${DIST}/pandoc
export ROOT=${ARTIFACTS}/pandoc
export DEST=${ROOT}/usr/local
export ME=$(whoami)
export BASE=pandoc-$VERSION
mkdir -p ${ARTIFACTS}
mkdir -p ${DIST}
mkdir -p ${RESOURCES}
mkdir -p ${DEST}/bin
mkdir -p ${DEST}/share/man/man1
@ -131,17 +129,10 @@ jobs:
$DEST/share/man/man1/pandoc-citeproc.1
${DEST}/bin/pandoc -t html5 -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
chown -R $ME:staff ${DIST}
echo Creating pkg...
pkgbuild --root $ROOT --identifier net.johnmacfarlane.pandoc --version $VERSION --ownership recommended ${ARTIFACTS}/pandoc.pkg
echo Creating zip...
cd ${DEST}
cd ..
mv local ${BASE}
zip -r ${ARTIFACTS}/${BASE}-macOS.zip ${BASE}
echo -e "${BASE}-macOS.pkg: pandoc.pkg\n\tproductbuild --distribution distribution.xml --resources Resources --package-path $< --version ${VERSION} --sign 'Developer ID Installer: John Macfarlane' -o \$@\n" > ${ARTIFACTS}/Makefile
cp macos/Makefile ${ARTIFACTS}/
echo ${VERSION} > ${ARTIFACTS}/version.txt
- uses: actions/upload-artifact@master
with:
name: macos-release-candidate