bump: ✈️ v1.0.0 → v1.0.1 #183
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
name: Build Docker images | |
on: | |
pull_request: | |
branches: ["main"] | |
push: | |
branches: ["main"] | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
debian-version: ["bullseye", "bookworm"] | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build the Docker image | |
shell: bash | |
run: | | |
docker buildx build . \ | |
--platform linux/amd64,linux/arm64 \ | |
--file Dockerfile \ | |
--tag python-latex:${{ matrix.python-version }}-slim-${{ matrix.debian-version }}-$(date +'%Y%m%d%H%M%S') \ | |
--build-arg PYTHON_VERSION=${{ matrix.python-version }} \ | |
--build-arg DEBIAN_VERSION=${{ matrix.debian-version }} | |
# Creates a GitHub Release when the build job succeeds, and only on pushes to tags. | |
release: | |
needs: [build] | |
permissions: | |
contents: write | |
if: needs.build.result == 'success' && startsWith( github.ref, 'refs/tags/v' ) | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: "npm" | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
npm ci | |
- name: Get the version | |
id: get_version | |
run: | | |
echo "${{ github.ref }}" | |
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Generate Release Title | |
id: get_release_title | |
shell: bash | |
run: | | |
export TODAY="($(TZ=Africa/Lusaka date --iso))" | |
echo ::set-output name=RELEASE_NAME::"${{ steps.get_version.outputs.VERSION }} $TODAY" | |
- name: Extract Release Notes | |
# This creates a file LATEST_RELEASE_NOTES.md in the parent directory (../) | |
shell: bash | |
run: | | |
python3 utils/release.py notes | |
- name: GitHub Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ steps.get_release_title.outputs.RELEASE_NAME }} | |
body_path: ../LATEST_RELEASE_NOTES.md |