Build(deps): Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #106
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: Building Koan packages | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-rockylinux-rpms: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build a RockyLinux 8 Package | |
shell: 'script -q -e -c "bash {0}"' | |
run: | | |
./docker/rpms/build-and-install-rpms.sh rl8 docker/rpms/RockyLinux8/RockyLinux8.dockerfile | |
- name: Archive RPMs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpms-rockylinux | |
path: | | |
rpm-build/*.rpm | |
build-fedora-rpms: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build a Fedora Package | |
shell: 'script -q -e -c "bash {0}"' | |
run: | | |
./docker/rpms/build-and-install-rpms.sh fc36 docker/rpms/Fedora/Fedora.dockerfile | |
- name: Archive RPMs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpms-fedora | |
path: | | |
rpm-build/*.rpm | |
build-opensuse-leap-rpms: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install System dependencies | |
run: sudo apt-get install -y rename | |
- name: Build a openSUSE Leap 15.3 Package | |
shell: 'script -q -e -c "bash {0}"' | |
run: | | |
./docker/rpms/build-and-install-rpms.sh opensuse-leap docker/rpms/openSUSE_Leap_15.3/openSUSE_Leap_15.3.dockerfile | |
- name: Rename RPM | |
run: | | |
file-rename -v -d -e 's/koan-(\d+\.\d+\.\d+)-1\.(\w+)\.rpm/koan-$1-1.leap.$2.rpm/' rpm-build/*.rpm | |
- name: Archive RPMs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpms-opensuse-leap | |
path: | | |
rpm-build/*.rpm | |
build-opensuse-tumbleweed-rpms: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install System dependencies | |
run: sudo apt-get install -y rename | |
- name: Build a openSUSE Tumbleweed Package | |
shell: 'script -q -e -c "bash {0}"' | |
run: | | |
./docker/rpms/build-and-install-rpms.sh opensuse-tumbleweed docker/rpms/openSUSE_Tumbleweed/openSUSE_TW.dockerfile | |
- name: Rename RPM | |
run: | | |
file-rename -v -d -e 's/koan-(\d+\.\d+\.\d+)-1\.(\w+)\.rpm/koan-$1-1.tw.$2.rpm/' rpm-build/*.rpm | |
- name: Archive RPMs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpms-opensuse-tumbleweed | |
path: | | |
rpm-build/*.rpm | |
build-debian-debs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build a Debian 10 Package | |
shell: 'script -q -e -c "bash {0}"' | |
run: | | |
./docker/debs/build-and-install-debs.sh deb10 docker/debs/debian/Debian10.dockerfile | |
- name: Archive DEBs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debs-debian | |
path: | | |
deb-build/DEBS/all/*.deb | |
build-wheel: | |
name: Build Python Wheel | |
runs-on: ubuntu-latest | |
# TODO: Move directly to Ubuntu - libvirt problems on GHA | |
container: registry.opensuse.org/opensuse/tumbleweed:latest | |
steps: | |
- name: Install system dependencies | |
run: >- | |
zypper -n in --no-recommends | |
git | |
tar | |
make | |
python3 | |
python3-base | |
python3-wheel | |
python3-build | |
python3-setuptools | |
python3-pip | |
python3-libvirt-python | |
python3-Sphinx | |
python3-netifaces | |
tree | |
- uses: actions/checkout@v4 | |
- name: Mark directory as safe for Git | |
run: git config --global --add safe.directory /__w/koan/koan | |
- name: Install dependencies | |
run: pip3 install --break-system-packages . | |
- name: Build a binary wheel and a source tarball | |
run: make release | |
- name: Show tree | |
run: tree | |
- name: Archive Wheel | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheel | |
path: | | |
dist/*.whl | |
dist/*.tar.gz | |
create-release: | |
name: Build the release and create a GitHub release | |
runs-on: ubuntu-latest | |
needs: [ | |
build-rockylinux-rpms, | |
build-fedora-rpms, | |
build-opensuse-leap-rpms, | |
build-opensuse-tumbleweed-rpms, | |
build-debian-debs, | |
build-wheel | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4.1.7 | |
name: Download all built artifacts | |
with: | |
path: artifacts | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Release | |
# https://github.com/softprops/action-gh-release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: Koan ${{ env.RELEASE_VERSION }} | |
discussion_category_name: "Announcements" | |
files: | | |
artifacts/debs-debian/*.deb | |
artifacts/rpms-fedora/*.rpm | |
artifacts/rpms-opensuse-leap/*.rpm | |
artifacts/rpms-opensuse-tumbleweed/*.rpm | |
artifacts/rpms-rockylinux/*.rpm | |
artifacts/wheel/*.tar.gz | |
artifacts/wheel/*.whl | |
body_path: changelog/${{ env.RELEASE_VERSION }}.md |