Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Peters committed Oct 27, 2021
1 parent 6d082d2 commit 6b1a0b4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
with:
python-version: 3.8

- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Cache Poetry virtualenv
uses: actions/cache@v1
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build and publish
run: |
poetry version $(git describe --tags --abbrev=0)
poetry build
poetry publish --username __token__ --password ${{ secrets.PYPI_PASSWORD }}
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "netbox-plugin-prometheus-sd"
version = "0.1.0"
version = "0.0.0" # placeholder
description = "A Netbox plugin to provide Netbox entires to Prometheus HTTP service discovery"
authors = ["Felix Peters <felix.peters@breuninger.de>"]
license = "MIT"
Expand All @@ -10,7 +10,7 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"

[tool.poetry.dev-dependencies]
black = "^21.7b0"
Expand Down

0 comments on commit 6b1a0b4

Please sign in to comment.