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 cd05d6f commit e59072a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/create-release-and-upload-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
ref: main
- name: git fetch --all
run: |
git config --global --add safe.directory /__w/openvpn-monitor/openvpn-monitor
Expand Down Expand Up @@ -136,6 +136,11 @@ jobs:
upload-package-to-pypi:
needs: create-release
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/openvpn-monitor
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up python
Expand All @@ -144,9 +149,9 @@ jobs:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
python3 -m pip install --upgrade pip
pip3 install setuptools wheel
- name: Build dists
run: python3 setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
pip3 install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
Expand Down

0 comments on commit e59072a

Please sign in to comment.