mirror of
https://github.com/drewcassidy/yaclog-ksp.git
synced 2024-09-01 14:58:44 +00:00
Compare commits
No commits in common. "9a8d3a608b1f372d282e7f37522ae381a29d2d64" and "939b39c3e6374c890a554a167ddee68b3c73eae8" have entirely different histories.
9a8d3a608b
...
939b39c3e6
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
@ -1,8 +0,0 @@
|
|||||||
# 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,47 +1,49 @@
|
|||||||
# 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: Deploy
|
name: build
|
||||||
on: [ push ]
|
on: [ push, pull_request ]
|
||||||
|
|
||||||
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@v4
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5.1.1
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '>=3.8'
|
python-version: '3.x'
|
||||||
|
|
||||||
|
- 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 Changelog Information
|
- name: Get version name and body
|
||||||
uses: drewcassidy/yaclog@1.4.2
|
run: |
|
||||||
id: yaclog-show
|
echo "VERSION_TILE=$(yaclog show -n)" >> $GITHUB_ENV
|
||||||
|
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
|
||||||
run: |
|
uses: softprops/action-gh-release@v1
|
||||||
gh release create ${{ github.ref_name }} \
|
with:
|
||||||
--notes-file "${{ steps.yaclog-show.outputs.body_file }}" \
|
files: dist/*
|
||||||
--title "${{ steps.yaclog-show.outputs.name }}"
|
name: ${{ env.VERSION_TITLE }}
|
||||||
|
body_path: RELEASE.md
|
||||||
gh release upload ${{ github.ref_name }} dist/*
|
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
12
CHANGELOG.md
12
CHANGELOG.md
@ -2,18 +2,6 @@
|
|||||||
|
|
||||||
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
43
action.yaml
@ -1,43 +0,0 @@
|
|||||||
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,53 +1,9 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = [
|
requires = [
|
||||||
"setuptools>=64",
|
"setuptools >= 35.0.2",
|
||||||
"setuptools_scm>=8",
|
"setuptools_scm[toml] >= 3.4",
|
||||||
"wheel"
|
"wheel"
|
||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[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]
|
[tool.setuptools_scm]
|
||||||
fallback_version = '0.0.0'
|
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
|
||||||
include = ["yaclog_ksp"]
|
|
39
setup.cfg
Normal file
39
setup.cfg
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
[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,8 +16,6 @@
|
|||||||
|
|
||||||
import pathlib
|
import pathlib
|
||||||
import re
|
import re
|
||||||
from sys import stdout
|
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import yaclog
|
import yaclog
|
||||||
|
|
||||||
@ -113,10 +111,7 @@ def main(path, outpath, name):
|
|||||||
fp.write('KERBALCHANGELOG\n')
|
fp.write('KERBALCHANGELOG\n')
|
||||||
fp.write(str(node))
|
fp.write(str(node))
|
||||||
|
|
||||||
if stdout.isatty():
|
|
||||||
print(f'wrote output to {outpath}')
|
print(f'wrote output to {outpath}')
|
||||||
else:
|
|
||||||
print(outpath)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user