Compare commits
1 commit
e812298ce8
...
126ac4d8dc
Author | SHA1 | Date | |
---|---|---|---|
126ac4d8dc |
5 changed files with 28 additions and 83 deletions
|
@ -1,4 +1,4 @@
|
|||
name: build pypackage and create release
|
||||
name: build and publish
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -9,55 +9,16 @@ on:
|
|||
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
|
||||
release-pypackage:
|
||||
uses: actions/workflows/.gitea/workflows/release_pypackage.yml@master
|
||||
with:
|
||||
fetch-depth: 0
|
||||
repository: main
|
||||
secrets:
|
||||
username: __token__
|
||||
token: ${{ secrets.PACKAGE_TOKEN }}
|
||||
gh-token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
update-changelog:
|
||||
uses: actions/workflows/.gitea/workflows/update_changelog.yml@master
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- 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/**
|
||||
branch: main
|
||||
|
|
|
@ -9,23 +9,6 @@ on:
|
|||
|
||||
jobs:
|
||||
check-code:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
uses: actions/workflows/.gitea/workflows/check_python_hatch.yml@master
|
||||
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
|
||||
run-tests: true
|
||||
|
|
20
.github/workflows/build_release.yml
vendored
20
.github/workflows/build_release.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: build pypackage and create release
|
||||
name: build and release
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -17,7 +17,7 @@ jobs:
|
|||
HATCH_INDEX_AUTH: ${{ secrets.PACKAGE_TOKEN }}
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
@ -25,18 +25,12 @@ jobs:
|
|||
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
|
||||
run: npm install -g auto-changelog
|
||||
|
||||
- name: generate changelog
|
||||
run: >-
|
||||
npx auto-changelog -t keepachangelog
|
||||
auto-changelog -t keepachangelog
|
||||
--commit-limit 50 --backfill-limit 50
|
||||
--ignore-commit-pattern '[Bb]ump version|[Uu]pdate changelog|[Mm]erge pull request'
|
||||
|
||||
|
@ -44,6 +38,12 @@ jobs:
|
|||
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'
|
||||
|
|
|
@ -1 +1 @@
|
|||
just 1.32.0
|
||||
just 1.31.0
|
||||
|
|
1
justfile
1
justfile
|
@ -19,6 +19,7 @@ show_system_info:
|
|||
|
||||
setup:
|
||||
asdf install
|
||||
lefthook install
|
||||
|
||||
create_venv:
|
||||
@echo "creating venv"
|
||||
|
|
Loading…
Reference in a new issue