temp #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Temp | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Version of BIThesis | |
required: true | |
type: string | |
default: v0.0.0-alpha.0 | |
# TODO | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
upload-to-ctan: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download bithesis.pdf | |
# TODO | |
run: gh run download --name bithesis --repo BITNP/BIThesis | |
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 BITNP/BIThesis --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: [email protected] | |
uploader: Feng Kaiyu |