mirror of
https://github.com/kolesa-team/pve-purestorage-plugin.git
synced 2026-08-12 21:53:06 -06:00
74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
name: Build deb
|
|
|
|
concurrency:
|
|
group: branch-${{ github.ref_name }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_call:
|
|
outputs:
|
|
deb:
|
|
description: "Deb artifact url FQIN"
|
|
value: ${{ jobs.config.outputs.fqin_release }}
|
|
|
|
jobs:
|
|
build-deb:
|
|
name: Build deb
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
path: src
|
|
|
|
- name: Install depedencies
|
|
working-directory: ./src
|
|
run: |
|
|
sudo apt-get build-dep .
|
|
|
|
- name: Generate changelog
|
|
working-directory: ./src
|
|
run: |
|
|
pkgname=libpve-storage-purestorage-perl
|
|
tag_list=$(git tag -l | grep -ve '-rc\.[0-9]$' | grep -ve '-beta\.[0-9]$' | sort -V)
|
|
for tag in ${tag_list}; do
|
|
tag_header="$tag^..$tag"
|
|
tag_info=$prevtag..$tag
|
|
tag_version=$(echo $tag | cut -c2-)-1
|
|
if [[ "$prevrag" == "" ]]; then
|
|
tag_header="$tag"
|
|
tag_info="$tag"
|
|
elif [[ "$tag" == "$prevtag" ]]; then
|
|
continue
|
|
fi
|
|
|
|
echo >> changelog
|
|
git log --pretty='format: -- %aN <%aE> %aD%n%n' $tag_header >> changelog
|
|
git log --pretty=format:' * %s%n' $tag_info >> changelog
|
|
echo "" >> changelog
|
|
echo "$pkgname ($tag_version) stable; urgency=medium" >> changelog
|
|
|
|
prevtag=$tag
|
|
done
|
|
|
|
tac changelog > debian/changelog
|
|
|
|
- name: Build deb
|
|
working-directory: ./src
|
|
run: |
|
|
dpkg-buildpackage -us -uc
|
|
|
|
- name: generate sha256sums
|
|
run: |
|
|
sha256sum *.deb > sha256sums
|
|
|
|
- id: artifact-upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: deb-artifact-${{ github.sha }}
|
|
if-no-files-found: error
|
|
compression-level: 0
|
|
overwrite: true
|
|
path: |
|
|
*.deb
|
|
sha256sums
|