Skip to content

Commit

Permalink
Merge pull request #102 from DanSheps/develop
Browse files Browse the repository at this point in the history
Develop to master
  • Loading branch information
DanSheps authored Sep 13, 2024
2 parents 0d6e200 + e532e5d commit 7de462f
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 32 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Build Test
on: [push, pull_request]
jobs:
pypi-publish:
name: Test Build Process
build:
name: Build Distribution
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
strategy:
matrix:
python-version: [3.12]
environment:
name: build
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
- name: Install pypa/build
run: python3 -m pip install build --user
- name: Build
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
68 changes: 51 additions & 17 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,67 @@ on:
release:
types: released
jobs:
pypi-publish:
name: Upload Release to PyPI

build:
name: Build Distribution
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
strategy:
matrix:
python-version: [3.12]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
- name: Build
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python -m build
#- name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository_url: https://test.pypi.org/legacy/
# skip_existing: true
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/netbox-config-backup
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
skip_existing: true
publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/netbox-config-backup
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down

0 comments on commit 7de462f

Please sign in to comment.