Build and Release Resume PDF #17
This file contains hidden or 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: Build and Release Resume PDF | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'resume/**' # Only triggers when resume directory changes | |
| workflow_dispatch: # Allows manual triggering | |
| # Add permissions for the GITHUB_TOKEN | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup typst | |
| uses: typst-community/setup-typst@v4 | |
| - name: Release resume/main.typ as PDF | |
| run: | | |
| typst compile --font-path ./resume/fonts resume/main.typ gabriel-steinberg-rust-engineer-resume.pdf | |
| - name: Delete existing latest release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Delete the release and tag if they exist | |
| gh release delete latest --yes || true | |
| git push --delete origin latest || true | |
| continue-on-error: true | |
| - name: Create latest release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create latest gabriel-steinberg-rust-engineer-resume.pdf \ | |
| --title "Latest Resume" \ | |
| --notes "Latest version of resume (updated $(date +'%Y-%m-%d %H:%M UTC')) | |
| **Last commit:** ${{ github.event.head_commit.message }} | |
| **Commit SHA:** ${{ github.sha }} | |
| Generated from \`resume/main.typ\` using typst." |