Compare commits
3 commits
126ac4d8dc
...
e812298ce8
Author | SHA1 | Date | |
---|---|---|---|
e812298ce8 | |||
f4e877e2fe | |||
65723753f6 |
5 changed files with 83 additions and 28 deletions
|
@ -1,4 +1,4 @@
|
||||||
name: build and publish
|
name: build pypackage and create release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -9,16 +9,55 @@ on:
|
||||||
branches: [main, master]
|
branches: [main, master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-pypackage:
|
release-github:
|
||||||
uses: actions/workflows/.gitea/workflows/release_pypackage.yml@master
|
runs-on: ubuntu-latest
|
||||||
with:
|
env:
|
||||||
repository: main
|
HATCH_INDEX_REPO: main
|
||||||
secrets:
|
HATCH_INDEX_USER: __token__
|
||||||
username: __token__
|
HATCH_INDEX_AUTH: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
token: ${{ secrets.PACKAGE_TOKEN }}
|
steps:
|
||||||
gh-token: ${{ secrets.GH_TOKEN }}
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
update-changelog:
|
- uses: actions/setup-python@v5
|
||||||
uses: actions/workflows/.gitea/workflows/update_changelog.yml@master
|
with:
|
||||||
with:
|
python-version: "3.11"
|
||||||
branch: main
|
|
||||||
|
- name: setup go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: ">=1.20"
|
||||||
|
|
||||||
|
- name: install hatc h
|
||||||
|
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: publish package
|
||||||
|
if: gitea.event_name != 'pull_request'
|
||||||
|
run: hatch publish --yes --no-prompt
|
||||||
|
|
||||||
|
- name: create gitea release
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
if: gitea.event_name != 'pull_request'
|
||||||
|
with:
|
||||||
|
title: ${{ gitea.ref_name }}
|
||||||
|
body: ${{ steps.release-notes.outputs.releasenotes }}
|
||||||
|
files: |-
|
||||||
|
dist/**
|
||||||
|
|
|
@ -9,6 +9,23 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-code:
|
check-code:
|
||||||
uses: actions/workflows/.gitea/workflows/check_python_hatch.yml@master
|
runs-on: ubuntu-latest
|
||||||
with:
|
steps:
|
||||||
run-tests: true
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
|
||||||
|
- name: install hatch
|
||||||
|
run: pip install -U hatch
|
||||||
|
|
||||||
|
- name: test codestyle
|
||||||
|
run: hatch run lint:style
|
||||||
|
|
||||||
|
- name: test typing
|
||||||
|
run: hatch run lint:typing
|
||||||
|
|
||||||
|
- name: run tests
|
||||||
|
run: hatch run default:test
|
||||||
|
|
20
.github/workflows/build_release.yml
vendored
20
.github/workflows/build_release.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: build and release
|
name: build pypackage and create release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -17,7 +17,7 @@ jobs:
|
||||||
HATCH_INDEX_AUTH: ${{ secrets.PACKAGE_TOKEN }}
|
HATCH_INDEX_AUTH: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- name: checkout code
|
- name: checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
@ -25,12 +25,18 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
|
|
||||||
|
- name: install hatch
|
||||||
|
run: pip install -U hatch hatchling
|
||||||
|
|
||||||
|
- name: build package
|
||||||
|
run: hatch build --clean
|
||||||
|
|
||||||
- name: install auto-changelog
|
- name: install auto-changelog
|
||||||
run: npm install -g auto-changelog
|
run: npm install auto-changelog
|
||||||
|
|
||||||
- name: generate changelog
|
- name: generate changelog
|
||||||
run: >-
|
run: >-
|
||||||
auto-changelog -t keepachangelog
|
npx auto-changelog -t keepachangelog
|
||||||
--commit-limit 50 --backfill-limit 50
|
--commit-limit 50 --backfill-limit 50
|
||||||
--ignore-commit-pattern '[Bb]ump version|[Uu]pdate changelog|[Mm]erge pull request'
|
--ignore-commit-pattern '[Bb]ump version|[Uu]pdate changelog|[Mm]erge pull request'
|
||||||
|
|
||||||
|
@ -38,12 +44,6 @@ jobs:
|
||||||
id: release-notes
|
id: release-notes
|
||||||
uses: olofvndrhr/releasenote-gen@v1
|
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
|
- name: create github release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
just 1.25.2
|
just 1.32.0
|
||||||
|
|
1
justfile
1
justfile
|
@ -19,7 +19,6 @@ show_system_info:
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
asdf install
|
asdf install
|
||||||
lefthook install
|
|
||||||
|
|
||||||
create_venv:
|
create_venv:
|
||||||
@echo "creating venv"
|
@echo "creating venv"
|
||||||
|
|
Loading…
Reference in a new issue