update ci files for github
All checks were successful
check code / check-code (push) Successful in 29s
All checks were successful
check code / check-code (push) Successful in 29s
This commit is contained in:
parent
7912997add
commit
6b06cada38
2 changed files with 56 additions and 4 deletions
|
@ -9,12 +9,10 @@ on:
|
||||||
branches: [main, master]
|
branches: [main, master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-pypackage:
|
release-pypackage:
|
||||||
uses: actions/workflows/.gitea/workflows/release_pypackage_github.yml@master
|
uses: actions/workflows/.gitea/workflows/release_pypackage.yml@master
|
||||||
with:
|
with:
|
||||||
repository: main
|
repository: main
|
||||||
gh-owner: olofvndrhr
|
|
||||||
gh-repo: octodns-netbox-dns
|
|
||||||
secrets:
|
secrets:
|
||||||
username: __token__
|
username: __token__
|
||||||
token: ${{ secrets.PACKAGE_TOKEN }}
|
token: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
|
|
54
.github/workflows/build_release.yml
vendored
Normal file
54
.github/workflows/build_release.yml
vendored
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
name: build and 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@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
|
||||||
|
- name: install auto-changelog
|
||||||
|
run: npm install -g auto-changelog
|
||||||
|
|
||||||
|
- name: generate changelog
|
||||||
|
run: >-
|
||||||
|
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: install hatch
|
||||||
|
run: pip install -U hatch hatchling
|
||||||
|
|
||||||
|
- name: build package
|
||||||
|
run: hatch build --clean
|
||||||
|
|
||||||
|
- 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/**
|
Loading…
Reference in a new issue