-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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: | | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 |
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