studylife-cli 1.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,137 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: ci-${{ github.event.pull_request.number || github.ref }}
11
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12
+
13
+ jobs:
14
+ lint:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v7.0.1
18
+ - uses: astral-sh/setup-uv@v9.0.0
19
+ with:
20
+ version: "0.5.8"
21
+ cache-suffix: "lint"
22
+ - run: uv python install 3.12
23
+ - run: uv sync --frozen
24
+ - run: uv run ruff check .
25
+ - run: uv run ruff format --check .
26
+
27
+ test:
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - uses: actions/checkout@v7.0.1
31
+ - uses: astral-sh/setup-uv@v9.0.0
32
+ with:
33
+ version: "0.5.8"
34
+ cache-suffix: "test"
35
+ - run: uv python install 3.12
36
+ - run: uv sync --frozen
37
+ - run: uv run pytest
38
+
39
+ # ---------------------------------------------------------------------
40
+ # Version / release - push to main only. No docker/trivy jobs here
41
+ # (unlike studylife-webhooks/studylife-developers): this is a CLI, it
42
+ # never runs as a server, so there's nothing to containerize.
43
+ # ---------------------------------------------------------------------
44
+ get-version:
45
+ needs: [lint, test]
46
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
47
+ runs-on: ubuntu-latest
48
+ permissions:
49
+ contents: write
50
+ outputs:
51
+ published: ${{ steps.semrel.outputs.new_release_published }}
52
+ steps:
53
+ - uses: actions/checkout@v7.0.1
54
+ with:
55
+ fetch-depth: 0
56
+ - name: Sync to the current tip of main
57
+ run: |
58
+ git fetch origin main
59
+ git checkout -B main origin/main
60
+ - id: semrel
61
+ uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
62
+ with:
63
+ dry_run: true
64
+ extra_plugins: |
65
+ @semantic-release/changelog@7.0.0
66
+ @semantic-release/git@11.0.1
67
+ env:
68
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69
+ - name: No release needed for this push
70
+ if: steps.semrel.outputs.new_release_published != 'true'
71
+ run: |
72
+ echo "No releasable commits since the last tag - semantic-release below skips itself via needs.get-version.outputs.published." | tee -a "$GITHUB_STEP_SUMMARY"
73
+
74
+ semantic-release:
75
+ needs: [get-version]
76
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && needs.get-version.outputs.published == 'true'
77
+ runs-on: ubuntu-latest
78
+ permissions:
79
+ contents: write
80
+ issues: write
81
+ pull-requests: write
82
+ steps:
83
+ - uses: actions/checkout@v7.0.1
84
+ with:
85
+ fetch-depth: 0
86
+ - id: semrel
87
+ uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
88
+ with:
89
+ extra_plugins: |
90
+ @semantic-release/changelog@7.0.0
91
+ @semantic-release/git@11.0.1
92
+ env:
93
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94
+ continue-on-error: true
95
+ - if: steps.semrel.outcome == 'failure'
96
+ name: "Diagnose before retrying (expected: an out-of-band push landed since checkout)"
97
+ run: |
98
+ git fetch origin main
99
+ BEFORE_SHA="$(git rev-parse HEAD)"
100
+ AFTER_SHA="$(git rev-parse origin/main)"
101
+ if [ "$BEFORE_SHA" != "$AFTER_SHA" ]; then
102
+ echo "origin/main moved since checkout ($BEFORE_SHA -> $AFTER_SHA) - this matches the out-of-band-push race this retry is designed for."
103
+ else
104
+ echo "::warning::origin/main did NOT move since checkout - this failure is likely NOT the expected out-of-band-push race. Retrying anyway, but check the semantic-release log above for the real cause before assuming this is just a race."
105
+ fi
106
+ git checkout -B main origin/main
107
+ - if: steps.semrel.outcome == 'failure'
108
+ uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
109
+ with:
110
+ extra_plugins: |
111
+ @semantic-release/changelog@7.0.0
112
+ @semantic-release/git@11.0.1
113
+ env:
114
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115
+
116
+ # Runs after semantic-release so the checkout below lands on the freshly tagged commit -
117
+ # hatch-vcs then resolves an exact version (e.g. "1.2.0"), not a "*.dev0+g<hash>" one, which
118
+ # is what a checkout of the pre-release commit would produce instead.
119
+ publish-pypi:
120
+ needs: [get-version, semantic-release]
121
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && needs.get-version.outputs.published == 'true'
122
+ runs-on: ubuntu-latest
123
+ environment: pypi
124
+ permissions:
125
+ id-token: write # trusted publishing (OIDC) - no PyPI token/secret needed
126
+ steps:
127
+ - uses: actions/checkout@v7.0.1
128
+ with:
129
+ ref: main
130
+ fetch-depth: 0 # full history + tags, so hatch-vcs can find the tag just created
131
+ - uses: astral-sh/setup-uv@v9.0.0
132
+ with:
133
+ version: "0.5.8"
134
+ cache-suffix: "publish"
135
+ - run: uv python install 3.12
136
+ - run: uv build
137
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,12 @@
1
+ __pycache__/
2
+ src/studylife_cli/_version.py
3
+ *.pyc
4
+ .venv/
5
+ venv/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ dist/
9
+ build/
10
+ *.egg-info/
11
+ .env
12
+ credentials.json
@@ -0,0 +1,21 @@
1
+ {
2
+ "branches": ["main"],
3
+ "plugins": [
4
+ "@semantic-release/commit-analyzer",
5
+ "@semantic-release/release-notes-generator",
6
+ [
7
+ "@semantic-release/changelog",
8
+ {
9
+ "changelogFile": "CHANGELOG.md"
10
+ }
11
+ ],
12
+ "@semantic-release/github",
13
+ [
14
+ "@semantic-release/git",
15
+ {
16
+ "assets": ["CHANGELOG.md"],
17
+ "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
18
+ }
19
+ ]
20
+ ]
21
+ }
@@ -0,0 +1,34 @@
1
+ # [1.3.0](https://github.com/lukislp/studylife-cli/compare/v1.2.0...v1.3.0) (2026-08-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * publish to PyPI on release via trusted publishing ([63b9a0a](https://github.com/lukislp/studylife-cli/commit/63b9a0a77067317491655e76cd5741c3a9b9cd22))
7
+
8
+ # [1.2.0](https://github.com/lukislp/studylife-cli/compare/v1.1.1...v1.2.0) (2026-08-29)
9
+
10
+
11
+ ### Features
12
+
13
+ * add verb-first command aliases, trim default table columns ([1c0971e](https://github.com/lukislp/studylife-cli/commit/1c0971ea3ba05f85f0ce49e438c87e7201339dd9))
14
+
15
+ ## [1.1.1](https://github.com/lukislp/studylife-cli/compare/v1.1.0...v1.1.1) (2026-08-29)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * make --json work after the subcommand, not just before it ([b5fdc1b](https://github.com/lukislp/studylife-cli/commit/b5fdc1b7fb143dcad907585a66c363ddaa6e1550))
21
+
22
+ # [1.1.0](https://github.com/lukislp/studylife-cli/compare/v1.0.0...v1.1.0) (2026-08-29)
23
+
24
+
25
+ ### Features
26
+
27
+ * sync package version to git tags, print JSON on mutations ([9a1a8ff](https://github.com/lukislp/studylife-cli/commit/9a1a8ff8aeb610e8de693a9f71441df96198c677))
28
+
29
+ # 1.0.0 (2026-08-29)
30
+
31
+
32
+ ### Features
33
+
34
+ * initial studylife-cli scaffold ([68fccad](https://github.com/lukislp/studylife-cli/commit/68fccad778ce292f6d8ddba51fa3ebe7b33e83c2))