Skip to content

update changelog.

update changelog. #140

Workflow file for this run

# Release workflow for linuxmuster-base7
#
# Usage: Copy this file into the linuxmuster-base7 repository:
# .github/workflows/release.yml
#
# Version and target distribution are read automatically from the first line
# of debian/changelog. Example:
# linuxmuster-base7 (7.3.5-0) lmn73; urgency=medium
#
# Required repository secrets:
# REPO_SSH_KEY GitHub SSH key for the linuxmuster/deb repository
#
# thomas@linuxmuster.net
# 20260427
name: Release
on:
push:
tags:
- 'v[0-9]*'
workflow_dispatch:
jobs:
resolve:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.image.outputs.image }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select runner image
id: image
run: |
DIST=$(dpkg-parsechangelog -S Distribution)
NUM="${DIST#lmn}"
if [ "${NUM:-0}" -ge 74 ] 2>/dev/null; then
echo "image=ghcr.io/linuxmuster/lmndev-runner:latest" >> "$GITHUB_OUTPUT"
else
echo "image=ghcr.io/linuxmuster/lmndev-runner:24.04" >> "$GITHUB_OUTPUT"
fi
build:
needs: resolve
runs-on: ubuntu-latest
container:
image: ${{ needs.resolve.outputs.image }}
options: --user root
outputs:
version: ${{ steps.meta.outputs.version }}
distribution: ${{ steps.meta.outputs.distribution }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: build
- name: Read version and distribution from debian/changelog
id: meta
working-directory: build
run: |
echo "version=$(dpkg-parsechangelog -S Version)" >> "$GITHUB_OUTPUT"
echo "distribution=$(dpkg-parsechangelog -S Distribution)" >> "$GITHUB_OUTPUT"
- name: Build package
run: /opt/lmndev/build/linuxmuster-base7.sh
env:
OUTPUT_DIR: ${{ github.workspace }}/output
- name: Upload packages as artifacts
uses: actions/upload-artifact@v4
with:
name: packages
path: output/
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
name: packages
path: packages/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.build.outputs.version }}
files: packages/*.deb
generate_release_notes: true
publish:
needs: [build, release]
runs-on: ubuntu-latest
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
name: packages
path: packages/
- name: Clone archive repository
uses: actions/checkout@v4
with:
repository: linuxmuster/deb
ssh-key: ${{ secrets.REPO_SSH_KEY }}
path: deb
- name: Publish packages (${{ needs.build.outputs.distribution }})
run: |
PACKAGE="linuxmuster-base7"
DISTRIBUTION="${{ needs.build.outputs.distribution }}"
VERSION="${{ needs.build.outputs.version }}"
BRANCH="$(echo "$PACKAGE-$DISTRIBUTION-$VERSION" | sed 's/~/tilde/')"
mkdir -p "deb/packages/$PACKAGE/$DISTRIBUTION"
rm -rf "deb/packages/$PACKAGE/$DISTRIBUTION/"*
cp packages/* "deb/packages/$PACKAGE/$DISTRIBUTION/"
cd deb
git config user.name github-actions
git config user.email github-actions@github.com
git checkout -b "update/$BRANCH"
git add .
git commit -m "Update $PACKAGE/$DISTRIBUTION to $VERSION (by GitHub Actions)"
git push --set-upstream origin "update/$BRANCH"