Skip to content

Merge pull request #4 from roumail/remove-dependencies #5

Merge pull request #4 from roumail/remove-dependencies

Merge pull request #4 from roumail/remove-dependencies #5

name: Release Website Package
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
pip install poetry
pip install keepachangelog@git+https://github.com/Colin-b/keepachangelog
- name: Get package version and changelog body
run: |
PACKAGE_VERSION=$(poetry version -s)
keepachangelog show $PACKAGE_VERSION > changelog_body.txt
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
- name: Build Package
run: poetry build
- name: Tag Release
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git tag -a v${{ env.PACKAGE_VERSION }} -m "Release v${{ env.PACKAGE_VERSION }}"
git push origin v${{ env.PACKAGE_VERSION }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*.tar.gz"
bodyFile: changelog_body.txt
token: ${{ secrets.GH_PAT }}
- name: Cleanup
run: rm changelog_body.txt