-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rafael Sene <[email protected]>
- Loading branch information
Showing
4 changed files
with
103 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build Specification | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Release version, e.g. X.Y.Z:' | ||
required: true | ||
type: string | ||
prerelease: | ||
description: 'Tag as a pre-release?' | ||
required: false | ||
type: boolean | ||
default: true | ||
draft: | ||
description: 'Create release as a draft?' | ||
required: false | ||
type: boolean | ||
default: false | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Build Docker Image | ||
run: docker build -t latex-make-env . | ||
|
||
- name: Run Container & Compile LaTeX | ||
run: | | ||
docker run --rm -v ${{ github.workspace }}:/data latex-make-env bash -c "\ | ||
git config --global --add safe.directory /data && \ | ||
make" | ||
# Step 4: Upload the built PDF files as a single artifact | ||
- name: Upload Build Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Specification Artifact | ||
path: ${{ github.workspace }}/*.pdf | ||
retention-days: 30 | ||
|
||
# Create Release | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ github.workspace }}/*.pdf | ||
tag_name: v${{ github.event.inputs.version }} | ||
name: Release ${{ github.event.inputs.version }} | ||
draft: ${{ github.event.inputs.draft }} | ||
prerelease: ${{ github.event.inputs.prerelease }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GHTOKEN }} | ||
if: github.event_name == 'workflow_dispatch' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Use an official Ubuntu as a parent image | ||
FROM ubuntu:latest | ||
|
||
# Set noninteractive mode for apt-get | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Update and install latex, git, make and other required tools | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
texlive-latex-base \ | ||
texlive-fonts-recommended \ | ||
texlive-fonts-extra \ | ||
texlive-latex-extra \ | ||
lmodern \ | ||
texlive-science \ | ||
make \ | ||
git && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set working directory | ||
WORKDIR /data | ||
|
||
# By default, run a shell | ||
CMD ["/bin/bash"] |
This file contains 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
Binary file not shown.