Skip to content

Commit

Permalink
build: updated semantic release and added package build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
strixy16 committed Dec 21, 2023
1 parent f276b76 commit 5a51e07
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

cd:
# Only run this job if the "ci" job passes
needs: ci
# needs: ci

# Only run this job if new work is pushed to "main"
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand All @@ -62,14 +62,24 @@ jobs:
- name: Install package
run: poetry install

- name: Use Python Semantic Release to prepare release
env:
# This token is created automatically by GH Actions
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This action uses Python Semantic Release v8
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}


- name: Install packaging-related tool
run:
python3 -m pip install build twine

- name: Build package
run: |
git config user.name github-actions
git config user.email [email protected]
poetry run semantic-release publish
poetry version $(git describe --tags --abbrev=0 | sed 's/^v//')
python -m build --sdist --wheel --outdir dist/ .
ls dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down

0 comments on commit 5a51e07

Please sign in to comment.