cmake: Set RUNPATH for grass libraries in non-standard library path (… #7
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: Create or check a release draft | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- .github/** | |
- utils/** | |
env: | |
OUT_DIR: ${{ github.workspace }}/../g_outdir | |
GDAL-GRASS: gdal-grass-${{ github.ref_name }} | |
permissions: | |
contents: write | |
jobs: | |
build-n-publish: | |
name: Package and create release draft | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ github.ref }} | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: '3.11' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install PyYAML | |
- name: Create output directory | |
run: | | |
mkdir ${{ env.OUT_DIR }} | |
- name: Generate ChangeLog file | |
run: | | |
lasttag="" | |
for tag in $(git tag -n --sort=-creatordate | cut -d' ' -f 1); do | |
if [[ $tag != *"RC"* && $tag != ${{ github.ref_name }} ]]; then | |
lasttag="$tag" | |
break | |
fi | |
done | |
echo "Creating CHANGELOG since v$lasttag" | |
echo "$(python ./utils/generate_release_notes.py log main \ | |
$lasttag ${{ github.ref_name }})" >> ${{ env.OUT_DIR }}/CHANGELOG | |
- name: Create tarballs (for tags only) | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
cd .. | |
tar -cvf ${{ env.OUT_DIR }}/${{ env.GDAL-GRASS }}.tar --exclude=".g*" \ | |
--transform s/gdal-grass/${{ env.GDAL-GRASS }}/ gdal-grass | |
cd ${{ env.OUT_DIR }} | |
gzip -9k ${{ env.GDAL-GRASS }}.tar | |
md5sum ${{ env.GDAL-GRASS }}.tar.gz > ${{ env.GDAL-GRASS }}.tar.gz.md5 | |
sha256sum ${{ env.GDAL-GRASS }}.tar.gz > ${{ env.GDAL-GRASS }}.tar.gz.sha256 | |
xz -9e ${{ env.GDAL-GRASS }}.tar | |
md5sum ${{ env.GDAL-GRASS }}.tar.xz > ${{ env.GDAL-GRASS }}.tar.xz.md5 | |
sha256sum ${{ env.GDAL-GRASS }}.tar.xz > ${{ env.GDAL-GRASS }}.tar.xz.sha256 | |
- name: Publish draft release to GitHub (for tags only) | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0 | |
with: | |
name: GDAL-GRASS GIS driver ${{ github.ref_name }} | |
body_path: ${{ env.OUT_DIR }}/CHANGELOG | |
draft: true | |
prerelease: ${{ contains(github.ref, 'RC') }} | |
files: | | |
${{ env.OUT_DIR }}/${{ env.GDAL-GRASS }}.tar.gz | |
${{ env.OUT_DIR }}/${{ env.GDAL-GRASS }}.tar.gz.md5 | |
${{ env.OUT_DIR }}/${{ env.GDAL-GRASS }}.tar.gz.sha256 | |
${{ env.OUT_DIR }}/${{ env.GDAL-GRASS }}.tar.xz | |
${{ env.OUT_DIR }}/${{ env.GDAL-GRASS }}.tar.xz.md5 | |
${{ env.OUT_DIR }}/${{ env.GDAL-GRASS }}.tar.xz.sha256 |