Skip to content

Commit

Permalink
Add publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
otto-ifak committed Nov 13, 2023
1 parent b096d13 commit d73e154
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Upload Python Package

on:
push:
tags:
- 'v*.*.*'

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt -r requirements.txt
- name: Run tests
run: ./bin/run_tests.sh
- name: Read version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Write version to pyproject.toml
run: |
echo "Version: $RELEASE_VERSION"
sed "s/__VERSION__/$RELEASE_VERSION/g" -i pyproject.toml
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "aas_test_engines"
version = "0.2"
description = "Official test tooling for the Asset Administration Shell"
readme = "README.md"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
keywords = ["asset administration shell", "aas", "test"]
requires-python = ">=3.6"

[project.urls]
Homepage = "https://github.com/admin-shell-io/aas-test-engines"

[project.scripts]
realpython = "reader.__main__:main"

[tool.setuptools.package-data]
"*" = ["*.yml"]

0 comments on commit d73e154

Please sign in to comment.