octodns-netbox-dns/.github/workflows/build_release.yml
Ivan Schaller 65723753f6
Some checks failed
check code / check-code (push) Has been cancelled
update ci ciles
Signed-off-by: Ivan Schaller <ivan@schaller.sh>
2024-07-17 20:35:11 +02:00

54 lines
1.3 KiB
YAML

name: build pypackage and create release
on:
push:
tags:
- "v*.*.*"
pull_request:
branches: [main, master]
jobs:
release-github:
runs-on: ubuntu-latest
env:
HATCH_INDEX_REPO: main
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.PACKAGE_TOKEN }}
steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: install hatch
run: pip install -U hatch hatchling
- name: build package
run: hatch build --clean
- name: install auto-changelog
run: npm install auto-changelog
- name: generate changelog
run: >-
npx auto-changelog -t keepachangelog
--commit-limit 50 --backfill-limit 50
--ignore-commit-pattern '[Bb]ump version|[Uu]pdate changelog|[Mm]erge pull request'
- name: get release notes
id: release-notes
uses: olofvndrhr/releasenote-gen@v1
- name: create github release
uses: ncipollo/release-action@v1
if: github.event_name != 'pull_request'
with:
name: ${{ github.ref_name }}
body: ${{ steps.release-notes.outputs.releasenotes }}
artifacts: |-
dist/**