Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENG-3807 Migrate to common release workflows #57

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .github/workflows/pub-pypi.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/release-validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release validation
on:
pull_request:
branches: release
types: [ opened, edited ]

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
release:
uses: netboxlabs/public-workflows/.github/workflows/reusable-plugin-release-validation.yml@develop
with:
plugin_package_name: netbox-floorplan-plugin
plugin_package_dir: netbox_floorplan
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release
on:
push:
branches: [ release ]

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
release:
uses: netboxlabs/public-workflows/.github/workflows/reusable-plugin-release.yml@develop
with:
plugin_package_name: netbox-floorplan-plugin
plugin_package_dir: netbox_floorplan
release_notes_from_pr_body: false
secrets: inherit
3 changes: 2 additions & 1 deletion netbox_floorplan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from netbox.plugins import PluginConfig
from .version import version_semver


class FloorplanConfig(PluginConfig):

name = "netbox_floorplan"
verbose_name = "Netbox Floorplan"
description = ""
version = "0.4.1"
version = version_semver()
base_url = "floorplan"
min_version = "4.0.2"
max_version = "4.0.11"
Expand Down
19 changes: 18 additions & 1 deletion netbox_floorplan/version.py
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
__version__ = "0.4.1"
#!/usr/bin/env python
"""Version stamp."""

# These properties are injected at build time by the build process.

__commit_hash__ = "unknown"
__track__ = "dev"
__version__ = "0.0.0"


def version_display():
"""Display the version, track and hash together."""
return f"v{__version__}-{__track__}-{__commit_hash__}"


def version_semver():
"""Semantic version."""
return __version__
Loading