mirror of
https://github.com/drewcassidy/yaclog-ksp.git
synced 2024-09-01 14:58:44 +00:00
Compare commits
10 Commits
939b39c3e6
...
9a8d3a608b
Author | SHA1 | Date | |
---|---|---|---|
9a8d3a608b | |||
f8ba353560 | |||
17acf53a87 | |||
40bff2ac00 | |||
553ed836bb | |||
|
c534acd525 | ||
b8b8c82d09 | |||
dffcea2994 | |||
be3e5e4325 | |||
a96073cb67 |
8
.github/dependabot.yml
vendored
Normal file
8
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Set update schedule for GitHub Actions
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
# Check for updates to GitHub Actions every week
|
||||||
|
interval: "weekly"
|
46
.github/workflows/python-publish.yml
vendored
46
.github/workflows/python-publish.yml
vendored
@ -1,49 +1,47 @@
|
|||||||
# This workflow will upload a Python Package using Twine when a release is created
|
# This workflow will upload a Python Package using Twine when a release is created
|
||||||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
||||||
|
|
||||||
name: build
|
name: Deploy
|
||||||
on: [ push, pull_request ]
|
on: [ push ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||||
|
environment:
|
||||||
|
name: pypi
|
||||||
|
url: https://pypi.org/p/yaclog-ksp
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v5.1.1
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '>=3.8'
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
python -m pip install setuptools wheel twine
|
|
||||||
python -m pip install yaclog
|
|
||||||
|
|
||||||
- name: Install pypa/build
|
- name: Install pypa/build
|
||||||
run: python -m pip install build --user
|
run: python -m pip install build --user
|
||||||
|
|
||||||
- name: Build a binary wheel and source tarball
|
- name: Build a Binary Wheel and Source Tarball
|
||||||
run: python -m build --sdist --wheel --outdir dist/
|
run: python -m build --sdist --wheel --outdir dist/
|
||||||
|
|
||||||
- name: Get version name and body
|
- name: Get Changelog Information
|
||||||
run: |
|
uses: drewcassidy/yaclog@1.4.2
|
||||||
echo "VERSION_TILE=$(yaclog show -n)" >> $GITHUB_ENV
|
id: yaclog-show
|
||||||
echo "$(yaclog show -mb)" >> RELEASE.md
|
|
||||||
|
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
||||||
|
|
||||||
- name: Publish to Github
|
- name: Publish to Github
|
||||||
uses: softprops/action-gh-release@v1
|
run: |
|
||||||
with:
|
gh release create ${{ github.ref_name }} \
|
||||||
files: dist/*
|
--notes-file "${{ steps.yaclog-show.outputs.body_file }}" \
|
||||||
name: ${{ env.VERSION_TITLE }}
|
--title "${{ steps.yaclog-show.outputs.name }}"
|
||||||
body_path: RELEASE.md
|
|
||||||
|
gh release upload ${{ github.ref_name }} dist/*
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ github.token }}
|
12
CHANGELOG.md
12
CHANGELOG.md
@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## Version 1.0.3 - 2024-08-27
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Adjusted dependencies. Click <8 is no longer supported
|
||||||
|
- When stdout is not a tty, only the output file path is printed
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added Github Action
|
||||||
|
|
||||||
|
|
||||||
## Version 1.0.2 - 2021-05-12
|
## Version 1.0.2 - 2021-05-12
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
43
action.yaml
Normal file
43
action.yaml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: Generate KSP Changelog
|
||||||
|
description: >
|
||||||
|
Use Yaclog to generate a KSP changelog config file for use with KerbalChangelog
|
||||||
|
branding:
|
||||||
|
icon: file-text
|
||||||
|
color: green
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
changelog-path:
|
||||||
|
description: "Path of the changelog markdown file"
|
||||||
|
mod-name:
|
||||||
|
description: "The name of your mod"
|
||||||
|
output-path:
|
||||||
|
description: "Path of the resulting changelog file"
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
output-path:
|
||||||
|
description: "Path of the resulting changelog file"
|
||||||
|
value: ${{ steps.yaclog-ksp.outputs.output-path}}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- id: setup-python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.12'
|
||||||
|
update-environment: 'false'
|
||||||
|
|
||||||
|
- name: Setup Yaclog-KSP
|
||||||
|
shell: bash
|
||||||
|
run: pipx install --python ${{ steps.setup-python.outputs.python-path }} ${{ github.action_path }}
|
||||||
|
|
||||||
|
- name: Generate KSP Changelog
|
||||||
|
id: yaclog-ksp
|
||||||
|
shell: bash
|
||||||
|
run: >
|
||||||
|
cat "output-path=$(
|
||||||
|
yaclog-ksp
|
||||||
|
${{ inputs.changelog-path && format('--path {0}', inputs.changelog-path) }}
|
||||||
|
${{ inputs.mod-name && format('--name {0}', inputs.mod-name) }}
|
||||||
|
${{ inputs.output-path && format('--output {0}', inputs.output-path) }}
|
||||||
|
)" >> "$GITHUB_OUTPUT"
|
@ -1,9 +1,53 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = [
|
requires = [
|
||||||
"setuptools >= 35.0.2",
|
"setuptools>=64",
|
||||||
"setuptools_scm[toml] >= 3.4",
|
"setuptools_scm>=8",
|
||||||
"wheel"
|
"wheel"
|
||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[tool.setuptools_scm]
|
[project]
|
||||||
|
name = "yaclog-ksp"
|
||||||
|
description = "Kerbal Space Program changelog file generator"
|
||||||
|
readme = "README.md"
|
||||||
|
authors = [{ name = "Andrew Cassidy", email = "drewcassidy@me.com" }]
|
||||||
|
keywords = ["changelog", "commandline", "markdown", "KSP"]
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"License :: OSI Approved :: GNU Affero General Public License v3",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
"Programming Language :: Python :: 3 :: Only",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Programming Language :: Python :: 3.12",
|
||||||
|
"Topic :: Text Processing :: Markup :: Markdown",
|
||||||
|
"Topic :: Software Development :: Version Control :: Git",
|
||||||
|
"Topic :: Utilities",
|
||||||
|
"Topic :: Games/Entertainment :: Simulation"
|
||||||
|
]
|
||||||
|
|
||||||
|
requires-python = ">= 3.8"
|
||||||
|
dependencies = [
|
||||||
|
"Click >= 8.0",
|
||||||
|
"yaclog ~= 1.0"
|
||||||
|
]
|
||||||
|
dynamic = ["version"]
|
||||||
|
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
yaclog-ksp = "yaclog_ksp.__main__:main"
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Source = "https://github.com/drewcassidy/yaclog-ksp"
|
||||||
|
Changelog = "https://github.com/drewcassidy/yaclog-ksp/blob/main/CHANGELOG.md"
|
||||||
|
"Forum Post" = "https://forum.kerbalspaceprogram.com/index.php?/topic/201784-*"
|
||||||
|
|
||||||
|
[tool.setuptools_scm]
|
||||||
|
fallback_version = '0.0.0'
|
||||||
|
|
||||||
|
[tool.setuptools.packages.find]
|
||||||
|
include = ["yaclog_ksp"]
|
39
setup.cfg
39
setup.cfg
@ -1,39 +0,0 @@
|
|||||||
[metadata]
|
|
||||||
# until setuptools supports PEP621, this will have to do
|
|
||||||
name = yaclog-ksp
|
|
||||||
description = Kerbal Space Program changelog file generator
|
|
||||||
author = Andrew Cassidy
|
|
||||||
license = AGPLv3
|
|
||||||
license_file = LICENSE.md
|
|
||||||
long_description = file: README.md
|
|
||||||
long_description_content_type = text/markdown
|
|
||||||
|
|
||||||
keywords = changelog, commandline, markdown, KSP
|
|
||||||
classifiers =
|
|
||||||
Development Status :: 5 - Production/Stable
|
|
||||||
Intended Audience :: Developers
|
|
||||||
License :: OSI Approved :: GNU Affero General Public License v3
|
|
||||||
Operating System :: OS Independent
|
|
||||||
Programming Language :: Python :: 3 :: Only
|
|
||||||
Programming Language :: Python :: 3
|
|
||||||
Programming Language :: Python :: 3.8
|
|
||||||
Programming Language :: Python :: 3.9
|
|
||||||
Topic :: Games/Entertainment :: Simulation
|
|
||||||
Topic :: Text Processing :: Markup :: Markdown
|
|
||||||
Topic :: Utilities
|
|
||||||
|
|
||||||
project_urls =
|
|
||||||
Changelog = https://github.com/drewcassidy/yaclog-ksp/blob/main/CHANGELOG.md
|
|
||||||
Source = https://github.com/drewcassidy/yaclog-ksp
|
|
||||||
Forum Post = https://forum.kerbalspaceprogram.com/index.php?/topic/201784-*
|
|
||||||
|
|
||||||
[options]
|
|
||||||
install_requires =
|
|
||||||
Click >= 7.0, < 9.0
|
|
||||||
yaclog ~= 1.0
|
|
||||||
python_requires = >= 3.8
|
|
||||||
packages = find:
|
|
||||||
|
|
||||||
[options.entry_points]
|
|
||||||
console_scripts =
|
|
||||||
yaclog-ksp = yaclog_ksp.__main__:main
|
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
import pathlib
|
import pathlib
|
||||||
import re
|
import re
|
||||||
|
from sys import stdout
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import yaclog
|
import yaclog
|
||||||
|
|
||||||
@ -111,7 +113,10 @@ def main(path, outpath, name):
|
|||||||
fp.write('KERBALCHANGELOG\n')
|
fp.write('KERBALCHANGELOG\n')
|
||||||
fp.write(str(node))
|
fp.write(str(node))
|
||||||
|
|
||||||
print(f'wrote output to {outpath}')
|
if stdout.isatty():
|
||||||
|
print(f'wrote output to {outpath}')
|
||||||
|
else:
|
||||||
|
print(outpath)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user