Skip to content

Commit

Permalink
Added deploy workflow (#3)
Browse files Browse the repository at this point in the history
- Tightened permissions for existing `build` workflow.
- Created new `deploy` workflow that triggers on release publish.
  • Loading branch information
etianen committed Jan 15, 2024
1 parent 177b074 commit 1628e4c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Build

on: push

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy

on:
release:
types: [published]

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
environment: PyPI
steps:
- uses: actions/checkout@v4
# Install toolchain.
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: pipx install poetry
# Build.
- run: poetry build
# Release.
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
- run: poetry publish
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 = "logtest"
version = "0.1.0"
version = "0.0.1-a0"
description = "Log-based testing"
authors = ["Dave Hall <dave@etianen.com>"]
license = "MIT"
Expand All @@ -13,7 +13,7 @@ packages = [{ include = "logtest" }]

[tool.poetry.dependencies]
python = "^3.8"
pytest = {version = "^7.4.4", optional = true}
pytest = { version = "^7.4.4", optional = true }

[tool.poetry.extras]
pytest = ["pytest"]
Expand Down

0 comments on commit 1628e4c

Please sign in to comment.