mirror of
https://github.com/soconnor0919/honors-thesis.git
synced 2026-02-04 21:46:31 -05:00
Add release creation to CI build workflow
Grant workflow contents: write and packages: read permissions. Add GitHub and Gitea release actions to publish thesis and proposal PDFs as the 'latest' release on push.
This commit is contained in:
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@@ -6,6 +6,10 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-github:
|
build-github:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -60,6 +64,21 @@ jobs:
|
|||||||
name: proposal-pdf
|
name: proposal-pdf
|
||||||
path: proposal/output/proposal.pdf
|
path: proposal/output/proposal.pdf
|
||||||
|
|
||||||
|
- name: Create Release (GitHub)
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
artifacts: "thesis/out/thesis.pdf,proposal/output/proposal.pdf"
|
||||||
|
tag: latest
|
||||||
|
name: Latest PDFs
|
||||||
|
body: |
|
||||||
|
Latest compiled thesis and proposal.
|
||||||
|
Built from commit ${{ github.sha }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
allowUpdates: true
|
||||||
|
removeArtifacts: true
|
||||||
|
replacesArtifacts: true
|
||||||
|
|
||||||
build-gitea:
|
build-gitea:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/xu-cheng/texlive-alpine:latest
|
container: ghcr.io/xu-cheng/texlive-alpine:latest
|
||||||
@@ -112,3 +131,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: proposal-pdf
|
name: proposal-pdf
|
||||||
path: proposal/output/proposal.pdf
|
path: proposal/output/proposal.pdf
|
||||||
|
|
||||||
|
- name: Create Release (Gitea)
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
files: |
|
||||||
|
thesis/out/thesis.pdf
|
||||||
|
proposal/output/proposal.pdf
|
||||||
|
name: Latest PDFs
|
||||||
|
tag_name: latest
|
||||||
|
prerelease: false
|
||||||
|
draft: false
|
||||||
|
|||||||
Reference in New Issue
Block a user