Beautify release

This commit is contained in:
Leonardo Murça 2025-03-06 23:59:08 -03:00
parent 1f1135a238
commit d277e80f0b

View file

@ -16,33 +16,44 @@ jobs:
image: docker:19.03.12-dind image: docker:19.03.12-dind
options: --privileged options: --privileged
steps: steps:
# Step 1: Setup git
- name: Set up Git repository - name: Set up Git repository
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
token: ${{ secrets.RELEASE_TOKEN }} # Use RELEASE_TOKEN instead of GITHUB_TOKEN token: ${{ secrets.RELEASE_TOKEN }} # Use RELEASE_TOKEN instead of GITHUB_TOKEN
- name: Install LaTeX # Step 2: Install latex dependencies
- name: Install LaTeX Dependencies
run: | run: |
apt-get update apt-get update
apt-get install -y texlive texlive-latex-extra texlive-fonts-recommended apt-get install -y texlive texlive-latex-extra texlive-fonts-recommended latexmk
# Step 3: Create build directory # Step 3: Create build directory
- name: Create dist directory - name: Create dist directory
run: | run: |
mkdir -p dist mkdir -p dist
# Step 3: Compile the LaTeX document (replace 'document.tex' with your actual file name) # Step 3: Compile the LaTeX
- name: Compile LaTeX document - name: Compile LaTeX document
run: | run: |
pdflatex -output-directory=dist main.tex # Output PDF to 'build' folder latexmk -pdf -output-directory=dist main.tex
# Step 4: Upload the compiled PDF as a release asset # Step 4: Get commit messages for the release (from the tag)
- name: Get commit messages for the release
id: get_commit_messages
run: |
# Get the commit messages for the tag
COMMITS=$(git log ${GITHUB_REF} --pretty=format:'- %s' | head -n 20) # You can limit the number of commits if needed
echo "commits=$COMMITS" >> $GITHUB_ENV # Store the commit messages in the environment
# Step 5: Upload the compiled PDF as a release asset
- name: Upload PDF to Release - name: Upload PDF to Release
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: main.pdf # The file to upload as the release asset name: main.pdf # The file to upload as the release asset
path: dist/main.pdf # Path to the compiled PDF path: dist/main.pdf # Path to the compiled PDF
# Step 6: Create release
- name: Create release - name: Create release
uses: actions/forgejo-release@v2 uses: actions/forgejo-release@v2
with: with:
@ -51,6 +62,6 @@ jobs:
direction: upload direction: upload
url: https://git.leomurca.xyz url: https://git.leomurca.xyz
repo: leomurca/resume repo: leomurca/resume
title: "New release!" title: "Release ${GITHUB_REF##*/}" # Tag name as the title
release-notes: "MY RELEASE NOTES" release-notes: "${{ env.commits }}" # Use the commit messages as release notes