Skip to content

Cleanup assignment template #3

Cleanup assignment template

Cleanup assignment template #3

Workflow file for this run

name: Build and release pdf
on:
push:
branches:
- main
permissions:
contents: write
jobs:
release_pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Create initial tag
run: |
if [ -z "$(git tag -l 'v*')" ]; then
git tag v0.0.0
fi
- name: Bump version and push tag
id: bump
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: 'patch'
- uses: typst-community/setup-typst@v3
- run: typst compile ./main.typ main.pdf
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.bump.outputs.new_tag }}
name: Version ${{ steps.bump.outputs.new_tag }}
draft: false
prerelease: false
files: |
main.pdf
- name: Upload Release Asset - Assignment
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./main.pdf
asset_name: main.pdf
asset_content_type: application/pdf