Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

0.9.0

0.9.0 #27

Workflow file for this run

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 }}