Skip to content

CI(deps): Update astral-sh/setup-uv action to v7.1.0 #5350

CI(deps): Update astral-sh/setup-uv action to v7.1.0

CI(deps): Update astral-sh/setup-uv action to v7.1.0 #5350

---
name: Create or check a release draft
on:
push:
branches:
- main
- releasebranch_*
tags:
- '**'
pull_request:
paths:
- .github/**
- utils/**
concurrency:
group: >-
${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
env:
OUT_DIR: ${{ github.workspace }}/../grass_outdir
GRASS: grass-${{ github.ref_name }}
permissions: {}
jobs:
build:
name: Package and create release draft
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checks-out repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ github.ref }}
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.14'
- name: Create output directory
run: |
mkdir "${OUT_DIR}"
- name: Generate ChangeLog file
run: |
python utils/gitlog2changelog.py
mv ChangeLog "${OUT_DIR}/ChangeLog"
gzip "${OUT_DIR}/ChangeLog"
- name: Generate Git derived data files
run: |
echo "Generate VERSION_GIT file:"
./utils/generate_version_git_file.sh
cat include/VERSION_GIT
echo "Generate GENERATE_LAST_COMMIT_FILE:"
python utils/generate_last_commit_file.py .
cat core_modules_with_last_commit.json
echo "Create core modules patch file:"
git add core_modules_with_last_commit.json
git diff --cached > \
"${OUT_DIR}/core_modules_with_last_commit.patch"
- name: Create tarballs (for tags only)
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ..
tar -cvf "${OUT_DIR}/${GRASS}.tar" \
--exclude=".gi*" --exclude=".tr*" \
--transform s/grass/"${GRASS}"/ grass
cd "${OUT_DIR}" || exit
gzip -9k "${GRASS}.tar"
md5sum "${GRASS}.tar.gz" > "${GRASS}.tar.gz.md5"
sha256sum "${GRASS}.tar.gz" > "${GRASS}.tar.gz.sha256"
xz -9e "${GRASS}.tar"
md5sum "${GRASS}.tar.xz" > "${GRASS}.tar.xz.md5"
sha256sum "${GRASS}.tar.xz" > "${GRASS}.tar.xz.sha256"
- name: Publish draft distribution to GitHub (for tags only)
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
with:
name: GRASS ${{ github.ref_name }}
body: |
Overview of changes
- First change
- Second change
draft: true
prerelease: ${{ contains(github.ref, 'RC') }}
files: |
${{ env.OUT_DIR }}/${{ env.GRASS }}.tar.gz
${{ env.OUT_DIR }}/${{ env.GRASS }}.tar.gz.md5
${{ env.OUT_DIR }}/${{ env.GRASS }}.tar.gz.sha256
${{ env.OUT_DIR }}/${{ env.GRASS }}.tar.xz
${{ env.OUT_DIR }}/${{ env.GRASS }}.tar.xz.md5
${{ env.OUT_DIR }}/${{ env.GRASS }}.tar.xz.sha256
${{ env.OUT_DIR }}/ChangeLog.gz
${{ env.OUT_DIR }}/core_modules_with_last_commit.patch