Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
246 changes: 2 additions & 244 deletions .github/workflows/release_dimclient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}

steps:
- run: echo "::set-output name=version::$(echo "$_REF" | cut -d'-' -f2-)"
- run: 'echo "version=${_REF#*-}" >> $GITHUB_OUTPUT'
id: version
shell: bash
env:
Expand All @@ -28,208 +27,10 @@ jobs:
name: dimclient-src-${{ steps.version.outputs.version }}.tar.gz
path: dimclient-src-${{ steps.version.outputs.version }}.tar.gz

el8:
runs-on: ubuntu-latest
needs: build
container:
image: oraclelinux:8
env:
_VERSION: ${{ needs.build.outputs.version }}
steps:
- run: /bin/dnf install --assumeyes python3-devel python3 rpm-build python3-dns tar gzip git
- uses: actions/checkout@v4
- run: mkdir -p ${HOME}/rpmbuild/SPECS
- run: mkdir -p ${HOME}/rpmbuild/SOURCES
- uses: actions/download-artifact@v4
with:
name: dimclient-src-${{ needs.build.outputs.version }}.tar.gz
path: ~/rpmbuild/SOURCES/
- shell: sh
run: |
cat <<EOF > ${HOME}/rpmbuild/SPECS/dimclient.spec
Name: python3-dimclient
Version: ${_VERSION}
Release: 1.el8
Summary: DNS and IP management python library

Group: application/system
License: MIT

Source0: dimclient-src-%{version}.tar.gz
BuildRequires: python3-devel
Requires: python3

# don't strip debug symbols, else it will all come crashing down
%define debug_package %{nil}
%define __strip /bin/true

%description
DNS and IP management

%prep
%autosetup -p1 -n dimclient-%{version}

%build
%py3_build

%install
%py3_install

%files
%{python3_sitelib}/*
EOF
- run: rpmbuild -ba ${HOME}/rpmbuild/SPECS/dimclient.spec
- uses: actions/upload-artifact@v4
with:
name: python3-dimclient-${{ needs.build.outputs.version }}-1.el8.x86_64.rpm
path: ~/rpmbuild/RPMS/x86_64/python3-dimclient-${{ needs.build.outputs.version }}-1.el8.x86_64.rpm

el9:
runs-on: ubuntu-latest
needs: build
container:
image: oraclelinux:9
env:
_VERSION: ${{ needs.build.outputs.version }}
steps:
- run: /bin/dnf install --assumeyes python3-devel python3 rpm-build python3-dns tar gzip git
- uses: actions/checkout@v4
- run: mkdir -p ${HOME}/rpmbuild/SPECS
- run: mkdir -p ${HOME}/rpmbuild/SOURCES
- uses: actions/download-artifact@v4
with:
name: dimclient-src-${{ needs.build.outputs.version }}.tar.gz
path: ~/rpmbuild/SOURCES/
- shell: sh
run: |
cat <<EOF > ${HOME}/rpmbuild/SPECS/dimclient.spec
Name: python3-dimclient
Version: ${_VERSION}
Release: 1.el9
Summary: DNS and IP management python library

Group: application/system
License: MIT

Source0: dimclient-src-%{version}.tar.gz
BuildRequires: python3-devel
Requires: python3

# don't strip debug symbols, else it will all come crashing down
%define debug_package %{nil}
%define __strip /bin/true

%description
DNS and IP management

%prep
%autosetup -p1 -n dimclient-%{version}

%build
%py3_build

%install
%py3_install

%files
%{python3_sitelib}/*
EOF
- run: rpmbuild -ba ${HOME}/rpmbuild/SPECS/dimclient.spec
- uses: actions/upload-artifact@v4
with:
name: python3-dimclient-${{ needs.build.outputs.version }}-1.el9.x86_64.rpm
path: ~/rpmbuild/RPMS/x86_64/python3-dimclient-${{ needs.build.outputs.version }}-1.el9.x86_64.rpm

fedora:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
os: [40]
container:
image: fedora:${{ matrix.os }}
env:
_VERSION: ${{ needs.build.outputs.version }}
steps:
- uses: actions/checkout@v4
- run: mkdir -p ${HOME}/rpmbuild/SPECS
- run: mkdir -p ${HOME}/rpmbuild/SOURCES
- run: /bin/dnf install --assumeyes python3-devel python3 rpm-build python3-dns python3-setuptools
- uses: actions/download-artifact@v4
with:
name: dimclient-src-${{ needs.build.outputs.version }}.tar.gz
path: ~/rpmbuild/SOURCES/
- shell: sh
run: |
cat <<EOF > ${HOME}/rpmbuild/SPECS/dimclient.spec
Name: python3-dimclient
Version: ${_VERSION}
Release: 1.fc${{ matrix.os }}
Summary: DNS and IP management python library

Group: application/system
License: MIT

Source0: dimclient-src-%{version}.tar.gz
BuildRequires: python3-devel
Requires: python3

# don't strip debug symbols, else it will all come crashing down
%define debug_package %{nil}
%define __strip /bin/true

%description
DNS and IP management

%prep
%autosetup -p1 -n dimclient-%{version}

%build
%py3_build

%install
%py3_install

%files
%{python3_sitelib}/*
EOF
- run: rpmbuild -ba ${HOME}/rpmbuild/SPECS/dimclient.spec
- uses: actions/upload-artifact@v4
with:
name: python3-dimclient-${{ needs.build.outputs.version }}-1.fc${{ matrix.os }}.x86_64.rpm
path: ~/rpmbuild/RPMS/x86_64/python3-dimclient-${{ needs.build.outputs.version }}-1.fc${{ matrix.os }}.x86_64.rpm

debian:
runs-on: ubuntu-latest
needs: build
container:
image: debian:12
env:
_VERSION: ${{ needs.build.outputs.version }}
steps:
- uses: actions/checkout@v4
- run: apt-get update
- run: apt-get install --yes build-essential python3 python3-dnspython bash-completion dh-python python3-setuptools python3-all debhelper devscripts
- run: cp -vr packaging/debian/dimclient/* dimclient/
- run: dch --create --package dimclient --newversion ${{ needs.build.outputs.version }} --distribution unstable 'release update'
working-directory: dimclient
env:
DEBMAIL: unknown <unknown@unknown>
- run: dpkg-buildpackage -us -uc -b
working-directory: dimclient
- uses: actions/upload-artifact@v4
with:
name: python3-dimclient_${{ needs.build.outputs.version }}_all.deb
path: python3-dimclient_${{ needs.build.outputs.version }}_all.deb

create_release:
runs-on: ubuntu-latest
needs:
- build
- debian
- el8
- el9
- fedora
steps:
- uses: actions/checkout@v4
- uses: actions/create-release@v1
Expand All @@ -244,18 +45,6 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: dimclient-src-${{ needs.build.outputs.version }}.tar.gz
- uses: actions/download-artifact@v4
with:
name: python3-dimclient-${{ needs.build.outputs.version }}-1.el8.x86_64.rpm
- uses: actions/download-artifact@v4
with:
name: python3-dimclient-${{ needs.build.outputs.version }}-1.el9.x86_64.rpm
- uses: actions/download-artifact@v4
with:
name: python3-dimclient-${{ needs.build.outputs.version }}-1.fc40.x86_64.rpm
- uses: actions/download-artifact@v4
with:
name: python3-dimclient_${{ needs.build.outputs.version }}_all.deb

- uses: actions/upload-release-asset@v1
env:
Expand All @@ -265,35 +54,4 @@ jobs:
asset_path: dimclient-src-${{ needs.build.outputs.version }}.tar.gz
asset_name: dimclient-src-${{ needs.build.outputs.version }}.tar.gz
asset_content_type: application/zip
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: python3-dimclient_${{ needs.build.outputs.version }}_all.deb
asset_name: python3-dimclient_${{ needs.build.outputs.version }}_all.deb
asset_content_type: application/vnd.debian.binary-package
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: python3-dimclient-${{ needs.build.outputs.version }}-1.el8.x86_64.rpm
asset_name: python3-dimclient-${{ needs.build.outputs.version }}-1.el8.x86_64.rpm
asset_content_type: application/octet-stream
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: python3-dimclient-${{ needs.build.outputs.version }}-1.el9.x86_64.rpm
asset_name: python3-dimclient-${{ needs.build.outputs.version }}-1.el9.x86_64.rpm
asset_content_type: application/octet-stream
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: python3-dimclient-${{ needs.build.outputs.version }}-1.fc40.x86_64.rpm
asset_name: python3-dimclient-${{ needs.build.outputs.version }}-1.fc40.x86_64.rpm
asset_content_type: application/octet-stream

Loading
Loading