Skip to content

feat: left-align all output and improve spacing #59

feat: left-align all output and improve spacing

feat: left-align all output and improve spacing #59

Workflow file for this run

name: Global Time Utility (gtime) tests and publish
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
permissions:
contents: write
packages: write
id-token: write # Required for Trusted Publishing
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Sync lock file
run: |
uv lock
- name: Install dependencies
run: |
uv sync --locked --extra dev
- name: Test CLI installation
run: |
uv run gtime --help
- name: Test basic functionality
run: |
uv run gtime London
uv run gtime add Tokyo
uv run gtime list
uv run gtime remove Tokyo
- name: Run tests
run: |
uv run pytest tests/
publish:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
- name: Build package
run: uv build
- name: Check package
run: uvx twine check dist/*
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.ref_name }}
body: |
## Changes in ${{ github.ref_name }}
This release was automatically created by GitHub Actions.
### Installation
```bash
uv tool install gtime
```
### What's New
- Check the commit history for detailed changes
- See the [README](https://github.com/${{ github.repository }}#readme) for usage instructions
### Full Changelog
**Full Changelog**: https://github.com/${{ github.repository }}/compare/v0.1.0...${{ github.ref_name }}
draft: false
prerelease: false
files: |
dist/*
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true