Skip to content

Commit

Permalink
fix: error in gha
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Dec 16, 2023
1 parent be7ce6f commit 472a2f6
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 31 deletions.
89 changes: 61 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,38 +40,71 @@ jobs:
- name: Build documentation
run: poetry run make html --directory docs/

Continuous-Development:
# needs: Continuous-Integration

release:
if: github.ref == 'refs/heads/main' # github.event_name == 'push' &&

# Set up operating system
runs-on: ubuntu-latest

# Define job steps
outputs:
version: ${{ steps.release.outputs.version }}
changelog: ${{ steps.release.outputs.changelog }}
tag: ${{ steps.release.outputs.tag }}
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12

- name: Check-out repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install poetry
uses: snok/install-poetry@v1

- name: Install package
run: poetry install

# This action uses Python Semantic Release v8
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@v8.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v2
with:
python-version: 3.12

- name: Install via poetry
run: |
pip install poetry
poetry config virtualenvs.in-project true
- name: Release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry version $(git describe --tags --abbrev=0)
poetry build
poetry publish --build -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }}
# # needs: Continuous-Integration

# if: github.ref == 'refs/heads/main' # github.event_name == 'push' &&

# # Set up operating system
# runs-on: ubuntu-latest

# # Define job steps
# steps:
# - name: Set up Python 3.12
# uses: actions/setup-python@v2
# with:
# python-version: 3.12

# - name: Check-out repository
# uses: actions/checkout@v2
# with:
# fetch-depth: 0

# - name: Install poetry
# uses: snok/install-poetry@v1

# - name: Install package
# run: poetry install

# # This action uses Python Semantic Release v8
# - name: Python Semantic Release
# id: release
# uses: python-semantic-release/python-semantic-release@v8.0.0
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}


# - name: Use Python Semantic Release to prepare release
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ python-semantic-release = "^8.5.1"
version_toml = [
"pyproject.toml:tool.poetry.version"
]

branch = "main"
upload_to_PyPI = false
upload_to_release = true
build_command = "echo 'Building...'"
commit_author = "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
build_command = "pip install poetry && poetry build"
version_source = "tag"
commit_version_number = true
commit_message = "chore(release): release {version}"

[tool.semantic_release.commit_parser_options]
allowed_tags = [
Expand Down

0 comments on commit 472a2f6

Please sign in to comment.