Skip to content

Release libjpeg static libraries #1

Release libjpeg static libraries

Release libjpeg static libraries #1

name: Release libjpeg static libraries
on:
workflow_dispatch:
permissions:
contents: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
prepare:
name: Prepare release
runs-on: ubuntu-24.04
outputs:
libjpeg_version: ${{ steps.version.outputs.libjpeg_version }}
tag_name: ${{ steps.version.outputs.tag_name }}
steps:
- name: Checkout source code
uses: actions/checkout@v6
- name: Read libjpeg version
id: version
run: |
libjpeg_version="$(awk '/^[[:space:]]*VERSION[[:space:]]+[0-9]/{print $2; exit}' libjpeg/CMakeLists.txt)"
if [ -z "$libjpeg_version" ]; then
echo "Could not read libjpeg version from libjpeg/CMakeLists.txt" >&2
exit 1
fi
tag_name="$(.github/scripts/next-release-tag.sh libjpeg "${libjpeg_version}")"
echo "libjpeg_version=${libjpeg_version}" >> "$GITHUB_OUTPUT"
echo "tag_name=${tag_name}" >> "$GITHUB_OUTPUT"
build:
name: Build release assets
needs: prepare
uses: ./.github/workflows/build-libjpeg.yml
release:
name: Publish release
needs:
- prepare
- build
runs-on: ubuntu-24.04
env:
GH_TOKEN: ${{ github.token }}
LIBJPEG_VERSION: ${{ needs.prepare.outputs.libjpeg_version }}
TAG_NAME: ${{ needs.prepare.outputs.tag_name }}
steps:
- name: Checkout source code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download build artifacts
uses: actions/download-artifact@v7
with:
path: release-assets
merge-multiple: true
- name: Create release tag
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a "${TAG_NAME}" -m "libjpeg ${LIBJPEG_VERSION}"
git push origin "refs/tags/${TAG_NAME}"
- name: Publish GitHub Release
run: |
gh release create "${TAG_NAME}" release-assets/* \
--verify-tag \
--title "libjpeg ${LIBJPEG_VERSION} static libraries" \
--notes "Static IJG libjpeg ${LIBJPEG_VERSION} libraries for TotalCross."