This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
0.9.0 #27
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: Release | |
on: | |
pull_request: | |
types: [closed] | |
branches: [master] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: master | |
- run: | | |
echo "TAG=v${{ github.event.pull_request.title }}" >> $GITHUB_ENV | |
echo "VERSION=${{ github.event.pull_request.title }}" >> $GITHUB_ENV | |
- name: Bump version | |
run: | | |
sed -i "3c\__version__ = \"${{ env.VERSION }}\"" hertavilla/version.py | |
- name: Push changes | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email github-actions[bot]@users.noreply.github.com | |
git add . | |
git commit -m ":bookmark: Release ${{ env.VERSION }}" | |
git tag ${{ env.TAG }} | |
git push && git push --tags | |
- name: Generate release changelog | |
uses: mikepenz/[email protected] | |
id: changelog | |
with: | |
configuration: .github/release_configuration.json | |
outputFile: CHANGELOG.md | |
- run: cat CHANGELOG.md | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v3 | |
with: | |
python-version: "3.10" | |
cache: true | |
cache-dependency-path: ./pdm.lock | |
- name: Install dependencies | |
run: pdm sync | |
shell: bash | |
- name: Build and Publish package | |
run: | | |
pdm publish | |
gh release create ${{ env.TAG }} -F CHANGELOG.md -t ${{ env.TAG }} dist/*.tar.gz dist/*.whl | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |