Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <[email protected]>
  • Loading branch information
woodruffw committed May 8, 2024
1 parent f272284 commit c7dca42
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 14 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
branches:
- main

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install build dependencies
run: python -m pip install -U setuptools wheel build
- name: Build
run: python -m build .
- name: Publish
uses: trail-of-forks/gh-action-pypi-publish@ww/attestations
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
# attestations: true
24 changes: 10 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# https://packaging.python.org/en/latest/tutorials/packaging-projects/#choosing-a-build-backend
[build-system]
# A list of packages that are needed to build your package:
requires = ["setuptools"] # REQUIRED if [build-system] table is used
requires = ["setuptools"] # REQUIRED if [build-system] table is used
# The name of the Python object that frontends will use to perform the build:
build-backend = "setuptools.build_meta" # If not defined, then legacy behavior can happen.
build-backend = "setuptools.build_meta" # If not defined, then legacy behavior can happen.


[project]
Expand All @@ -26,14 +26,14 @@ build-backend = "setuptools.build_meta" # If not defined, then legacy behavior
# There are some restrictions on what makes a valid project name
# specification here:
# https://packaging.python.org/specifications/core-metadata/#name
name = "sampleproject" # REQUIRED, is the only field that cannot be marked as dynamic.
name = "gha-pep740-experiments" # REQUIRED, is the only field that cannot be marked as dynamic.

# Versions should comply with PEP 440:
# https://www.python.org/dev/peps/pep-0440/
#
# For a discussion on single-sourcing the version, see
# https://packaging.python.org/guides/single-sourcing-package-version/
version = "3.0.0" # REQUIRED, although can be dynamic
version = "3.0.0" # REQUIRED, although can be dynamic

# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:
Expand All @@ -59,7 +59,7 @@ requires-python = ">=3.8"
# This is either text indicating the license for the distribution, or a file
# that contains the license.
# https://packaging.python.org/en/latest/specifications/core-metadata/#license
license = {file = "LICENSE.txt"}
license = { file = "LICENSE.txt" }

# This field adds keywords for your project which will appear on the
# project page. What does your project relate to?
Expand All @@ -72,15 +72,13 @@ keywords = ["sample", "setuptools", "development"]
# This should be your name or the name of the organization who originally
# authored the project, and a valid email address corresponding to the name
# listed.
authors = [
{name = "A. Random Developer", email = "[email protected]" }
]
authors = [{ name = "A. Random Developer", email = "[email protected]" }]

# This should be your name or the names of the organization who currently
# maintains the project, and a valid email address corresponding to the name
# listed.
maintainers = [
{name = "A. Great Maintainer", email = "[email protected]" }
{ name = "A. Great Maintainer", email = "[email protected]" },
]

# Classifiers help users find your project by categorizing it.
Expand Down Expand Up @@ -118,17 +116,15 @@ classifiers = [
#
# For an analysis of this field vs pip's requirements files see:
# https://packaging.python.org/discussions/install-requires-vs-requirements/
dependencies = [
"peppercorn"
]
dependencies = ["peppercorn"]

# List additional groups of dependencies here (e.g. development
# dependencies). Users will be able to install these using the "extras"
# syntax, for example:
#
# $ pip install sampleproject[dev]
#
# Optional dependencies the project provides. These are commonly
# Optional dependencies the project provides. These are commonly
# referred to as "extras". For a more extensive definition see:
# https://packaging.python.org/en/latest/specifications/dependency-specifiers/#extras
[project.optional-dependencies]
Expand Down Expand Up @@ -163,4 +159,4 @@ sample = "sample:main"
[tool.setuptools]
# If there are data files included in your packages that need to be
# installed, specify them here.
package-data = {"sample" = ["*.dat"]}
package-data = { "sample" = ["*.dat"] }

0 comments on commit c7dca42

Please sign in to comment.