Skip to content

Commit

Permalink
update github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
furlongm committed Dec 22, 2024
1 parent e59072a commit f88b4c0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/create-release-and-upload-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: |
apt update
export DEBIAN_FRONTEND=noninteractive
apt -y install python3-setuptools debhelper dh-exec dh-python git-buildpackage
apt -y install python3-setuptools debhelper dh-exec dh-python git-buildpackage yarnpkg
- name: Fix sh so env vars propogate
run: |
rm /bin/sh
Expand All @@ -73,7 +73,7 @@ jobs:
export upload_url=$(<upload_url.txt)
rm upload_url.txt
echo "upload_url=${upload_url}" >> $GITHUB_ENV
- name: Build deb packages
- name: Build deb package
env:
EMAIL: [email protected]
COMMIT_MSG: |
Expand All @@ -86,8 +86,9 @@ jobs:
git diff --quiet && git diff --staged --quiet || git commit -m "${COMMIT_MSG}"
gbp dch --new-version=${version}-1 --release --distribution=stable --spawn-editor=never --commit --commit-msg="${COMMIT_MSG}"
git tag --delete v${version}
git tag v${version}
gbp buildpackage --git-upstream-tree=${{ github.ref }} -uc -us
git tag ${version}
yarnpkg --prod --modules-folder openvpn_monitor/static/dist install
gbp buildpackage --ignore-branch --git-upstream-tree=${{ github.ref }} -uc -us
- name: Get version
run: echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Upload deb
Expand All @@ -107,7 +108,9 @@ jobs:
steps:
- name: Install build dependencies
run: |
dnf -y install rpm-build python3 python3-setuptools git
dnf -y install epel-release
dnf makecache
dnf -y install rpm-build python3 python3-setuptools git yarnpkg
- uses: actions/checkout@v4
- name: Download upload_url artifact
uses: actions/download-artifact@v4
Expand All @@ -118,8 +121,9 @@ jobs:
export upload_url=$(cat upload_url.txt)
rm upload_url.txt
echo "upload_url=${upload_url}" >> $GITHUB_ENV
- name: Build rpm packages
- name: Build rpm package
run: |
yarnpkg --prod --modules-folder openvpn_monitor/static/dist install|
sed -i -e "s/name='.*/name='python3-openvpn-monitor',/" setup.py
python3 setup.py bdist_rpm
- name: Get version
Expand Down Expand Up @@ -149,9 +153,12 @@ jobs:
python-version: '3.x'
- name: Install dependencies
run: |
apt -y install yarnpkg
python3 -m pip install --upgrade pip
pip3 install setuptools wheel
- name: Build dists
run: python3 setup.py sdist bdist_wheel
run: |
yarnpkg --prod --modules-folder openvpn_monitor/static/dist install
python3 setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

data_files = []

for dirpath, dirnames, filenames in os.walk('openvpn_monitor/static/images/flags'):
data_files = [('share/openvpn-monitor/images/flags',
for dirpath, dirnames, filenames in os.walk('openvpn_monitor/static'):
data_files = [('share/openvpn-monitor/static',
[os.path.join(dirpath, f) for f in filenames])]

if sys.prefix == '/usr':
Expand Down

0 comments on commit f88b4c0

Please sign in to comment.