feat: left-align all output and improve spacing #59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |