photobook/.github/workflows/make-dist.yml
2022-11-14 02:07:36 +03:00

75 lines
2.1 KiB
YAML

name: make dist
on:
push:
branches: [ "main" ]
tags: v**
pull_request:
branches: [ "main" ]
jobs:
make-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build dist
uses: xu-cheng/texlive-action/full@v1
with:
run: |
apk add make git zip
git config --global --add safe.directory '*'
echo "VERSION=$(make version)" >> $GITHUB_ENV
echo 'COMMENT<<EOF' >> $GITHUB_ENV
git log -1 --pretty=%B >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
make dist ctan-dist
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/photobook-*.zip
- name: Artifacts - build
uses: actions/upload-artifact@v3
with:
name: build artifacts
path: photobook.pdf
- name: Artifacts - dist
uses: actions/upload-artifact@v3
with:
name: dist artifacts
path: dist/photobook-*.zip
- name: Upload to CTAN (release)
uses: paolobrasolin/ctan-submit-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
action: upload
file_path: dist/photobook.zip
fields: |
pkg: photobook
version: ${{ env.VERSION }}
update: true
author: Alex A. Naanou
email: alex.nanou@gmail.com
uploader: Alex A. Naanou <alex.nanou@gmail.com>
license: bsd3
home: https://github.com/flynx/photobook
repository: https://github.com/flynx/photobook
summary: >
Document class for typesetting photo books.
description: >
The photobook LaTeX document class extends the book class
defining a set of parameters, meta-macros, macros and
environments with reasonable defaults to help typeset,
build and print books mainly based on visual/image content.
announcement: >
${{ env.COMMENT }}