Compare commits

...

8 Commits

Author SHA1 Message Date
0ca8609bb7 Try to guess version from action ref 2024-08-27 01:42:29 -07:00
394cac155f Fix possible exclusion of yaclog.cli 2024-08-27 01:42:18 -07:00
4d57ef2fb0 fix deploy permissions 2024-08-27 01:03:09 -07:00
4626e25838 Release Version 1.4.2
### Fixed

- Fixed package failing to install without git history

### Added

- Added the ability to specify the changelog path in the action
2024-08-27 00:51:21 -07:00
5373cb9b48 Add ability to specify changelog path 2024-08-27 00:49:40 -07:00
e3fc69d305 minor action tweaks
(cherry picked from commit 73a5ae0f9b7e64f2c52d9928a9e3a7fc9d49555d)
2024-08-27 00:36:04 -07:00
d61208b583 Add pretend version when installing in action 2024-08-27 00:20:53 -07:00
2a39c69700 Setup pypi trusted publishing 2024-08-26 23:30:05 -07:00
4 changed files with 35 additions and 22 deletions

View File

@ -47,6 +47,12 @@ jobs:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment:
name: pypi
url: https://pypi.org/p/yaclog
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
@ -56,25 +62,19 @@ jobs:
with:
python-version: '>=3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and source tarball
run: python -m build --sdist --wheel --outdir dist/
- name: Get version info
- name: Get Changelog Information
id: yaclog-show
uses: ./
# self-hosting!
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish to Github
run: |

View File

@ -2,6 +2,17 @@
All notable changes to this project will be documented in this file
## Version 1.4.2 - 2024-08-27
### Fixed
- Fixed package failing to install without git history
### Added
- Added the ability to specify the changelog path in the action
## Version 1.4.1 - 2024-08-25
### Fixed

View File

@ -1,12 +1,13 @@
name: Yaclog
description: >
Get version information from a changelog, and optionally create a new release.
The `yaclog` command is made available for use in future steps.
description: Get version information from a changelog
branding:
icon: file-text
color: orange
inputs:
changelog-path:
description: "Path of the changelog markdown file"
markdown:
description: If outputs should be in markdown format or not
default: 'true'
@ -45,21 +46,21 @@ runs:
- name: Setup Yaclog
shell: bash
run: pipx install --python ${{ steps.setup-python.outputs.python-path }} ${{ github.action_path }}
run: |
[[ "$ACTION_REF" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_YACLOG="$ACTION_REF"
pipx install --python ${{ steps.setup-python.outputs.python-path }} ${{ github.action_path }}
env:
ACTION_REF: ${{ github.action_ref }}
- name: Create New Release
shell: bash
if: ${{ inputs.release }}
run: yaclog release --yes --commit ${{ inputs.release }}
- name: Get Version Information
- name: Get Changelog Information
id: yaclog-show
shell: bash
run: |
yaclog show ---gh-actions ${{ inputs.markdown && '--markdown' }} >> "$GITHUB_OUTPUT"
# output like so:
# name=Version 1.3.0
# header=Version 1.3.0 - 2024-08-08
# version=1.3.0
# body_file={path to file containing version body}
# changelog={path to changelog}
run: >
yaclog ${{ inputs.changelog-path && format('--path {0}', inputs.changelog-path) }}
show ---gh-actions ${{ inputs.markdown && '--markdown' }}
| tee -a "$GITHUB_OUTPUT"

View File

@ -57,6 +57,7 @@ Changelog = "https://github.com/drewcassidy/yaclog/blob/main/CHANGELOG.md"
Docs = "https://yaclog.readthedocs.io/"
[tool.setuptools_scm]
fallback_version = "0.0.0"
[tool.setuptools.packages.find]
include = ["yaclog"]
include = ["yaclog*"]