Skip to content

Token split 2

Token split 2 #45

Workflow file for this run

name: Build and Release PDF
permissions:
contents: write
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
root_file: unicity-yellowpaper.tex
- name: Upload PDF as artifact
uses: actions/upload-artifact@v4
with:
name: Unicity-Yellowpaper
path: unicity-yellowpaper.pdf
if-no-files-found: error
compression-level: 0
release:
needs: build_latex
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: Unicity-Yellowpaper
path: ./
- name: Get latest commit info
id: commit
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "release_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Move 'latest' tag to current commit
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git tag -f latest
git push origin -f refs/tags/latest
- name: Create or Update GitHub Release
id: create_release
uses: ncipollo/release-action@v1
with:
tag: latest
name: "Unicity Yellowpaper"
body: |
📄 This release contains the latest compiled version of the Unicity Yellowpaper'
- Date: ${{ env.release_date }}
- Commit: ${{ env.sha_short }}
artifacts: unicity-yellowpaper.pdf
allowUpdates: true
artifactErrorsFailBuild: true
makeLatest: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}