Skip to content

Commit

Permalink
fix: Updates to workflows (#14)
Browse files Browse the repository at this point in the history
This is a partial test commit to make sure we can get some base setup for releasing
  • Loading branch information
RemoteRabbit authored Feb 27, 2024
1 parent 00fdaab commit 5dea305
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 21 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/main-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ permissions:
contents: write
pull-requests: write

name: release-please
name: Main Workflow

jobs:
# TODO: Jobs and or workflows for testing
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.REPO_PAT }}
release-type: python

pypi-dry-run:
uses: ./.github/workflows/python-publish.yml
with:
DRY_RUN: true
47 changes: 28 additions & 19 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
name: Upload Python Package
on:
release:
types: [published]
workflow_call:
inputs:
DRY_RUN:
description: Bool to check for dry-run
type: boolean
default: true
PUBLISH:
description: Bool if to publish to PyPi Prod
type: boolean
default: false
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
dry-run:
if: ${{ inputs.DRY_RUN }}
name: PyPi Dry-Run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to pypi
- name: Build and dry-run publish to PyPi
uses: JRubics/poetry-publish@v2.0
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
poetry_install_options: "--sync --no-root"
poetry_install_options: "--sync"
poetry_publish_options: "--dry-run"
# - name: Set up Python
# uses: actions/setup-python@v3
# with:
# python-version: '^3.12'
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# - name: Build package
# run: poetry publish --build
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}

publish:
if: ${{ inputs.PUBLISH }}
name: Publish to PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v2.0
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
poetry_install_options: "--sync"
Empty file added CHANGELOG.md
Empty file.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# akapy

Home to a Python wrapper for the Akamai API.

## Notes

## Changes

## Questions
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "akapy"
version = "0.0.3"
version = "0.0.4"
description = "A Akamai API wrapper for Python!"
authors = ["Tristan Jahnke <trjahnke@protonmail.com>"]
license = "GPL-3.0-only"
Expand Down

0 comments on commit 5dea305

Please sign in to comment.