diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 5d6c7ec..cd1e512 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -2,43 +2,35 @@ name: PyPI Build on: release: types: released - jobs: - build: + pypi-publish: + name: Upload Release to PyPI runs-on: ubuntu-latest + permissions: + id-token: write strategy: matrix: python-version: [3.9] steps: - - name: Checkout repo uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies run: | python -m pip install --upgrade pip pip install --upgrade setuptools wheel - - - name: Build run: python setup.py sdist bdist_wheel - - name: Publish package to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ skip_existing: true - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} skip_existing: true \ No newline at end of file diff --git a/netbox_config_backup/api/nested_serializers.py b/netbox_config_backup/api/nested_serializers.py index 87ac5e4..047e649 100644 --- a/netbox_config_backup/api/nested_serializers.py +++ b/netbox_config_backup/api/nested_serializers.py @@ -10,7 +10,7 @@ class NestedBackupSerializer(WritableNestedSerializer): - url = serializers.HyperlinkedIdentityField(view_name='plugins-api:netbox_sync-api:sync-detail') + url = serializers.HyperlinkedIdentityField(view_name='plugins-api:netbox_config_backup-api:sync-detail') class Meta: model = Backup diff --git a/netbox_config_backup/api/serializers.py b/netbox_config_backup/api/serializers.py index 72d8286..05c1665 100644 --- a/netbox_config_backup/api/serializers.py +++ b/netbox_config_backup/api/serializers.py @@ -13,7 +13,7 @@ class BackupSerializer(NetBoxModelSerializer): - url = serializers.HyperlinkedIdentityField(view_name='plugins-api:netbox_sync-api:sync-detail') + url = serializers.HyperlinkedIdentityField(view_name='plugins-api:netbox_config_backup-api:sync-detail') device = NestedDeviceSerializer() ip = NestedIPAddressSerializer() diff --git a/setup.py b/setup.py index 90eac0e..2f3bf15 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='netbox_config_backup', - version='1.4.5', + version='1.4.6', description='NetBox Configuration Backup', long_description='Plugin to backup device configuration', url='https://github.com/dansheps/netbox-config-backup/',