Skip to content

Commit

Permalink
add steps to publish in github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
prakaa committed Aug 20, 2024
1 parent 021c642 commit aaf9ac5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
50 changes: 28 additions & 22 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,31 @@ jobs:
# verbose: true

# Publishes to PyPi if tests are passed and release is created
# publish:
# if: github.event_name == 'release' && github.event.action == 'created'
# needs: test
# runs-on: ubuntu-latest
# steps:
# # Checkout repo
# - name: Checkout
# uses: actions/checkout@v3
# # Install rye with cache
# - name: Install the latest version of rye
# uses: eifinger/setup-rye@v4
# with:
# enable-cache: true
# # Sync dependencies
# - name: Sync dependencies
# run: rye sync
# # Build and publish to PyPI
# - name: Build and publish to pypi
# uses: JRubics/[email protected]
# with:
# pypi_token: ${{ secrets.PYPI_TOKEN }}
#
publish:
if: github.event_name == 'release' && github.event.action == 'created'
needs: test
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/isp-workbook-parser/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
# Checkout repo
- name: Checkout
uses: actions/checkout@v3
# Install rye with cache
- name: Install the latest version of rye
uses: eifinger/setup-rye@v4
with:
enable-cache: true
# Sync dependencies
- name: Sync dependencies
run: rye sync
# Build
- name: Build
run: rye build
# Publish to PyPI
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1token "$PYPI_TOKEN"
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[project]
name = "isp-workbook-parser"
version = "0.1.0"
description = "Add your description here"
description = "A Python package for reading data from the Inputs, Assumptions and Scenarios Report (IASR) Microsoft Excel workbook published by the Australian Energy Market Operator for use in their Integrated System Plan modelling."
authors = [
{ name = "nick-gorman", email = "[email protected]" }
{ name = "nick-gorman", email = "[email protected]" },
{ name = "prakaa", email = "[email protected]" },
{ name = "dylanjmcconnell", email = "[email protected]" }
]
dependencies = [
"pandas>=2.2.2",
Expand All @@ -12,7 +14,7 @@ dependencies = [
"pyyaml>=6.0.1",
]
readme = "README.md"
requires-python = ">= 3.8"
requires-python = ">= 3.9"

[build-system]
requires = ["setuptools>=61.0", "wheel"]
Expand Down

0 comments on commit aaf9ac5

Please sign in to comment.