Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ jobs:
with:
poetry-version: "latest"

- name: install-poetry-plugins
- name: setup-pypi
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry self add poetry-pyinstaller-plugin
poetry self add poetry-plugin-taskipy

- name: build
run: poetry build
run: poetry publish --build

- name: Release
uses: softprops/action-gh-release@v2
Expand All @@ -34,4 +35,4 @@ jobs:
dist/*.whl
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 4 additions & 14 deletions template-python/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,8 @@
"email": "shawndeng1109@qq.com",
"project_slug": "{{ cookiecutter.repo_name.strip().lower().replace('-', '_') }}",
"description": "A short description of the project.",
"include_cli": {
"__prompt__": "Include CLI interface? (y/n)",
"__choices__": [
"y",
"n"
]
},
"create_github_repo": {
"__prompt__": "Create GitHub repo? Requires ~/.github/config.json with GitHub token (y/n)",
"__choices__": [
"y",
"n"
]
}
"include_cli": [
"y",
"n"
]
}
1 change: 1 addition & 0 deletions template-python/hooks/post_gen_project.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import subprocess
from githubkit import GitHub


def remove_cli():
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Bump version

on:
pull_request:
branches:
- master
workflow_dispatch:

jobs:
bump-version:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: release-build
on:
push:
tags:
- '*.*.*'
workflow_dispatch:

jobs:
release-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: abatilo/actions-poetry@v2
with:
poetry-version: "latest"

- name: setup-pypi
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry self add poetry-pyinstaller-plugin
poetry self add poetry-plugin-taskipy

- name: build
run: poetry publish --build

- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/**/*.exe
dist/*.tar.gz
dist/*.whl
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading