Build Debian Package #2
Workflow file for this run
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: Build Debian package | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
DEB_BUILD_OPTIONS: nocheck | |
jobs: | |
build-artifact: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Install packaging dependencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y \ | |
python3 python3-dev python3-pip python3-venv python3-all \ | |
dh-python debhelper devscripts dput software-properties-common \ | |
python3-distutils python3-setuptools python3-wheel python3-stdeb \ | |
python3-all | |
- name: Build Debian/Apt sdist_dsc | |
run: | | |
python3 -m pip install . | |
rm -Rf deb_dist/* | |
python3 setup.py --command-packages=stdeb.command sdist_dsc | |
- name: Build Debian/Apt bdist_deb | |
run: | | |
python3 -m pip install . | |
export REPO_NAME=$(echo ${{ github.repository }} | awk -F"/" '{print $2}') | |
python3 setup.py --command-packages=stdeb.command bdist_deb | |
ls -al deb_dist/ | |
cp deb_dist/python3-${REPO_NAME}_*_all.deb deb_dist/python3-${REPO_NAME}_latest_all.deb | |
- uses: actions/upload-artifact@master | |
with: | |
name: artifact-deb | |
path: | | |
deb_dist/*.deb | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: deb_dist/*.deb | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |