Rectify installation instructions #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Package, Tag and Release | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install Poetry & Podman | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
export PATH="$HOME/.local/bin:$PATH" | |
sudo apt-get update && sudo apt-get -y install podman | |
- name: Install poetry project dependencies | |
run: poetry install | |
- name: Build the project | |
run: poetry run crzd build | |
- name: Extract version and create tag | |
id: version_and_tag | |
run: | | |
VERSION=$(grep -E '^version\s*=' pyproject.toml | sed -E 's/version = "(.*)"/\1/') | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git tag -a "v$VERSION" -m "Version $VERSION" | |
git push -f origin "v$VERSION" | |
- name: Upload artifacts to GitHub release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION: ${{ env.VERSION }} | |
run: | | |
gh release upload "v${VERSION}" dist/*.whl --clobber || gh release create "v${VERSION}" dist/*.whl |