Skip to content

CTAN

CTAN #1

Workflow file for this run

name: CTAN
on:
workflow_dispatch:
inputs:
version:
description: Version of BIThesis
required: true
type: string
default: v0.0.0-alpha.0
release:
types:
- published
env:
REPO: BITNP/BIThesis
jobs:
upload-to-ctan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download bithesis.pdf
run: gh run download --name bithesis --repo ${{ env.REPO }}
env:
GH_TOKEN: ${{ github.token }}
- run: make pkg-only
- name: Determine version
id: version
env:
GH_TOKEN: ${{ github.token }}
run: |
version=${{ inputs.version || github.event.release.tag_name }}
if [ -z "$version" ]; then
# Populate with the tag name of the latest release
version=$(gh release list --repo ${{ env.REPO }} --limit 1 --json tagName | jq '.[0].tagName' --raw-output)
fi
echo "number=$(echo $version | sed 's/^v//')" >> "$GITHUB_OUTPUT"
echo "date=$(date '+%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- name: Upload to CTAN
uses: paolobrasolin/ctan-submit-action@v1
with:
action: validate
file_path: bithesis.zip
fields: |
update: "true"
pkg: bithesis
version: ${{ steps.version.outputs.number }} ${{ steps.version.outputs.date }}
author: Feng Kaiyu
email: loveress01@outlook.com
uploader: Feng Kaiyu
- name: Report
run: |
echo "🎉 Successfully upload ${{ steps.version.outputs.number }} (${{ steps.version.outputs.date }}) to [CTAN](https://www.ctan.org/pkg/bithesis)." >> $GITHUB_STEP_SUMMARY