gwmock-data 0.1.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.
Files changed (61) hide show
  1. gwmock_data-0.1.0/.coderabbit.yaml +3 -0
  2. gwmock_data-0.1.0/.github/ISSUE_TEMPLATE/bug-report.md +56 -0
  3. gwmock_data-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. gwmock_data-0.1.0/.github/ISSUE_TEMPLATE/feature-request.md +46 -0
  5. gwmock_data-0.1.0/.github/pull_request_template.md +40 -0
  6. gwmock_data-0.1.0/.github/workflows/ci.yml +79 -0
  7. gwmock_data-0.1.0/.github/workflows/codeql.yml +36 -0
  8. gwmock_data-0.1.0/.github/workflows/documentation.yml +47 -0
  9. gwmock_data-0.1.0/.github/workflows/draft_release.yml +51 -0
  10. gwmock_data-0.1.0/.github/workflows/publish.yml +76 -0
  11. gwmock_data-0.1.0/.github/workflows/publish_testpypi.yml +98 -0
  12. gwmock_data-0.1.0/.github/workflows/release.yml +59 -0
  13. gwmock_data-0.1.0/.github/workflows/scheduled_release.yml +195 -0
  14. gwmock_data-0.1.0/.github/workflows/semantic_pull_request.yml +20 -0
  15. gwmock_data-0.1.0/.github/workflows/support_floor_update.yml +64 -0
  16. gwmock_data-0.1.0/.github/zizmor.yml +13 -0
  17. gwmock_data-0.1.0/.gitignore +138 -0
  18. gwmock_data-0.1.0/.markdownlint.yaml +42 -0
  19. gwmock_data-0.1.0/.pre-commit-config.yaml +77 -0
  20. gwmock_data-0.1.0/.prettierrc +7 -0
  21. gwmock_data-0.1.0/.pypirc +10 -0
  22. gwmock_data-0.1.0/.typos.toml +20 -0
  23. gwmock_data-0.1.0/CITATION.cff +13 -0
  24. gwmock_data-0.1.0/CODE_OF_CONDUCT.md +131 -0
  25. gwmock_data-0.1.0/CONTRIBUTING.md +190 -0
  26. gwmock_data-0.1.0/LICENSE +26 -0
  27. gwmock_data-0.1.0/PKG-INFO +59 -0
  28. gwmock_data-0.1.0/README.md +29 -0
  29. gwmock_data-0.1.0/SECURITY.md +53 -0
  30. gwmock_data-0.1.0/SUPPORT.md +38 -0
  31. gwmock_data-0.1.0/cliff.toml +126 -0
  32. gwmock_data-0.1.0/docs/api/index.md +10 -0
  33. gwmock_data-0.1.0/docs/api/io.md +17 -0
  34. gwmock_data-0.1.0/docs/api/sampling_grid.md +17 -0
  35. gwmock_data-0.1.0/docs/api/timeseries.md +17 -0
  36. gwmock_data-0.1.0/docs/contributing.md +1 -0
  37. gwmock_data-0.1.0/docs/gen_ref_pages.py +95 -0
  38. gwmock_data-0.1.0/docs/index.md +1 -0
  39. gwmock_data-0.1.0/docs/javascripts/mathjax.js +12 -0
  40. gwmock_data-0.1.0/docs/security.md +1 -0
  41. gwmock_data-0.1.0/docs/style/api.css +18 -0
  42. gwmock_data-0.1.0/docs/user_guide/time-series.md +92 -0
  43. gwmock_data-0.1.0/pyproject.toml +200 -0
  44. gwmock_data-0.1.0/renovate.json +89 -0
  45. gwmock_data-0.1.0/scripts/release_version.py +150 -0
  46. gwmock_data-0.1.0/src/gwmock_data/__init__.py +13 -0
  47. gwmock_data-0.1.0/src/gwmock_data/_optional.py +35 -0
  48. gwmock_data-0.1.0/src/gwmock_data/io/__init__.py +7 -0
  49. gwmock_data-0.1.0/src/gwmock_data/io/hdf5.py +88 -0
  50. gwmock_data-0.1.0/src/gwmock_data/sampling_grid.py +167 -0
  51. gwmock_data-0.1.0/src/gwmock_data/timeseries.py +428 -0
  52. gwmock_data-0.1.0/src/gwmock_data/version.py +11 -0
  53. gwmock_data-0.1.0/tests/conftest.py +16 -0
  54. gwmock_data-0.1.0/tests/io/test_hdf5.py +168 -0
  55. gwmock_data-0.1.0/tests/smoke_test.py +22 -0
  56. gwmock_data-0.1.0/tests/test_import.py +67 -0
  57. gwmock_data-0.1.0/tests/test_release_version.py +148 -0
  58. gwmock_data-0.1.0/tests/test_sampling_grid.py +111 -0
  59. gwmock_data-0.1.0/tests/test_timeseries.py +593 -0
  60. gwmock_data-0.1.0/uv.lock +2912 -0
  61. gwmock_data-0.1.0/zensical.toml +352 -0
@@ -0,0 +1,3 @@
1
+ reviews:
2
+ auto_review:
3
+ enabled: false
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: 🐛 Bug Report
3
+ about: Create a report to help us improve
4
+ title: '[BUG]: '
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## 📝 Description
10
+
11
+ A clear and concise description of what the bug is.
12
+
13
+ ## 🚀 Reproduction Steps
14
+
15
+ Steps to reproduce the behavior:
16
+
17
+ 1. '...'
18
+ 2. '...'
19
+ 3. '...'
20
+
21
+ ## 💻 Minimal Reproducible Example
22
+
23
+ Please provide a short snippet of Python code that demonstrates the issue. Use
24
+ code blocks for readability:
25
+
26
+ ```python
27
+ # Your code here
28
+ ```
29
+
30
+ ## 📋 Expected Behavior
31
+
32
+ A clear and concise description of what you expected to happen.
33
+
34
+ ## 💥 Actual Behavior / Traceback
35
+
36
+ If applicable, add the Python error traceback here **after redacting secrets**
37
+ (API keys, tokens, credentials, private URLs/paths, personal data). If this is a
38
+ potential security vulnerability, do **not** post it publicly; use the Security
39
+ reporting channel instead.
40
+
41
+ ```text
42
+ Traceback (most recent call last):
43
+ ...
44
+
45
+ ```
46
+
47
+ ## 🛠 Environment Information
48
+
49
+ - **Python Version:** (e.g., 3.13)
50
+ - **Package Version:** (e.g., 1.2.3)
51
+ - **Operating System:** (e.g., Windows 11, Ubuntu 22.04, macOS)
52
+ - **Relevant Dependencies:** (e.g., numpy, pandas version if applicable)
53
+
54
+ ## 📎 Additional Context
55
+
56
+ Add any other context about the problem here (e.g., screenshots, logs).
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: GitHub Community Support
4
+ url: https://github.com/Leuven-Gravity-Institute/gwmock-data/discussions
5
+ about: Please ask and answer questions here.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: ✨ Feature Request
3
+ about: Suggest an idea or improvement for this package
4
+ title: '[FEATURE]: '
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## 🎯 Problem Statement
10
+
11
+ Is your feature request related to a problem? Please describe.
12
+
13
+ > _Ex: "I'm always frustrated when I have to manually loop over X to achieve
14
+ > Y..."_
15
+
16
+ ## 💡 Proposed Solution
17
+
18
+ A clear and concise description of what you want to happen. Describe the new
19
+ functionality or the change to existing behavior.
20
+
21
+ ## 💻 Proposed API / Usage Example
22
+
23
+ If applicable, show how you would imagine the Python code looking with this new
24
+ feature:
25
+
26
+ ```python
27
+ import package_name_placeholder
28
+
29
+ # How you'd like to use the new feature
30
+ result = package_name_placeholder.new_function(param="example")
31
+ ```
32
+
33
+ ## 🌈 Use Case & Benefits
34
+
35
+ Why is this feature important to you and other users? How does it improve the
36
+ package?
37
+
38
+ ## 🔄 Alternatives Considered
39
+
40
+ A clear and concise description of any alternative solutions or workarounds
41
+ you've considered (e.g., using a different library or a custom wrapper).
42
+
43
+ ## ⚠️ Additional Context
44
+
45
+ Add any other context, screenshots, or links to similar implementations in other
46
+ libraries here.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: 🚀 Pull Request
3
+ about: Submit your changes for review
4
+ ---
5
+
6
+ ## 📝 Summary
7
+
8
+ Briefly describe the changes introduced by this PR. Mention any related issues
9
+ using keywords (e.g., `Closes #123`).
10
+
11
+ ## ✨ Type of Change
12
+
13
+ - [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
14
+ - [ ] ✨ New feature (non-breaking change which adds functionality)
15
+ - [ ] 💥 Breaking change (fix or feature that would cause existing functionality
16
+ to not work as expected)
17
+ - [ ] 📝 Documentation update
18
+ - [ ] 🎨 Refactoring (no functional changes, no API changes)
19
+
20
+ ## 🧪 How Has This Been Tested
21
+
22
+ Please describe the tests that you ran to verify your changes.
23
+
24
+ - [ ] **Unit Tests:** `uv run pytest tests/test_feature.py`
25
+ - [ ] **Manual Test:** (Describe steps)
26
+
27
+ ## 🏗️ Checklist
28
+
29
+ - [ ] My code follows the style guidelines of this project (PEP 8).
30
+ - [ ] I have performed a self-review of my own code.
31
+ - [ ] I have commented my code, particularly in hard-to-understand areas.
32
+ - [ ] I have made corresponding changes to the documentation.
33
+ - [ ] My changes generate no new warnings.
34
+ - [ ] I have added tests that prove my fix is effective or that my feature
35
+ works.
36
+
37
+ ## 📷 Screenshots (if applicable)
38
+
39
+ If this is a UI change or produces a specific output/graph, add screenshots
40
+ here.
@@ -0,0 +1,79 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ pull_request:
6
+ branches: [main]
7
+ workflow_dispatch:
8
+ workflow_call:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ test:
15
+ strategy:
16
+ matrix:
17
+ # Latest resolutions run everywhere; the SPEC 0 minimum
18
+ # (lowest-direct) runs on ubuntu with the oldest supported
19
+ # Python, since floor versions predate newer interpreters'
20
+ # wheels.
21
+ python-version: ['3.13', '3.14', '3.15']
22
+ os: [ubuntu-latest, windows-latest, macos-latest]
23
+ resolution: [highest]
24
+ include:
25
+ - os: ubuntu-latest
26
+ python-version: '3.13'
27
+ resolution: lowest-direct
28
+ runs-on: ${{ matrix.os }}
29
+ steps:
30
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
31
+ with:
32
+ persist-credentials: false
33
+
34
+ - name: Install uv
35
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
36
+ with:
37
+ python-version: ${{ matrix.python-version }}
38
+ enable-cache: 'true'
39
+
40
+ - name: Install dependencies
41
+ shell: bash
42
+ env:
43
+ RESOLUTION: ${{ matrix.resolution }}
44
+ run: |
45
+ if [ "$RESOLUTION" = "lowest-direct" ]; then
46
+ uv sync --group dev --upgrade --resolution lowest-direct
47
+ else
48
+ uv sync --group dev --upgrade
49
+ fi
50
+
51
+ - name: Run tests with pytest
52
+ run: uv run --no-sync pytest
53
+
54
+ - name: Upload coverage to Codecov
55
+ if: ${{ !cancelled() }}
56
+ uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5
57
+ with:
58
+ token: ${{ secrets.CODECOV_TOKEN }}
59
+
60
+ zizmor:
61
+ # pre-commit.ci cannot run the zizmor hook (language: system), so the
62
+ # workflow security audit runs here instead.
63
+ runs-on: ubuntu-latest
64
+ steps:
65
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
66
+ with:
67
+ persist-credentials: false
68
+
69
+ - name: Install uv
70
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
71
+ with:
72
+ python-version: '3.13'
73
+ enable-cache: 'true'
74
+
75
+ - name: Install dependencies
76
+ run: uv sync --group dev --frozen
77
+
78
+ - name: Run zizmor
79
+ run: uv run --frozen zizmor .github/workflows
@@ -0,0 +1,36 @@
1
+ name: 'CodeQL Advanced'
2
+
3
+ on:
4
+ push:
5
+ branches: ['main']
6
+ pull_request:
7
+ branches: ['main']
8
+ schedule:
9
+ - cron: '0 0 * * 1'
10
+ workflow_call:
11
+
12
+ jobs:
13
+ analyze:
14
+ name: Analyze
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ security-events: write
18
+ actions: read
19
+ contents: read
20
+ steps:
21
+ - name: Checkout repository
22
+ uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
23
+ with:
24
+ persist-credentials: false
25
+
26
+ - name: Initialize CodeQL
27
+ uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
28
+ with:
29
+ languages: python
30
+ queries: security-and-quality
31
+
32
+ - name: Autobuild
33
+ uses: github/codeql-action/autobuild@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
34
+
35
+ - name: Perform CodeQL Analysis
36
+ uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
@@ -0,0 +1,47 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: pages
15
+ cancel-in-progress: false
16
+
17
+ jobs:
18
+ deploy:
19
+ runs-on: ubuntu-latest
20
+ # Set the repository variable DEPLOY_DOCS to "true" once GitHub Pages
21
+ # is enabled (Settings -> Pages -> Source: GitHub Actions).
22
+ if: vars.DEPLOY_DOCS == 'true'
23
+ environment:
24
+ name: github-pages
25
+ url: ${{ steps.deployment.outputs.page_url }}
26
+ steps:
27
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
28
+ with:
29
+ persist-credentials: false
30
+
31
+ - name: Install uv
32
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
33
+ with:
34
+ python-version: '3.14.3'
35
+ enable-cache: 'true'
36
+
37
+ - name: Install dependencies
38
+ run: uv sync --group docs --frozen
39
+
40
+ - run: uv run --frozen zensical build
41
+
42
+ - uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
43
+ with:
44
+ path: site
45
+
46
+ - id: deployment
47
+ uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
@@ -0,0 +1,51 @@
1
+ name: Draft Release
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: write
9
+ pull-requests: read
10
+
11
+ concurrency:
12
+ group: draft-release
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ draft-release:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
20
+ with:
21
+ persist-credentials: false
22
+ fetch-depth: 0
23
+
24
+ - name: Generate changelog
25
+ id: changelog
26
+ uses: orhun/git-cliff-action@a9a95522b26fe6403f7bb24031f21fb573d0f5ff # v4.9.1
27
+ with:
28
+ config: cliff.toml
29
+ args: --unreleased --verbose
30
+ env:
31
+ OUTPUT: CHANGELOG.md
32
+
33
+ - name: Delete existing draft release
34
+ continue-on-error: true
35
+ run: |
36
+ gh release delete next-release --yes
37
+ env:
38
+ GH_TOKEN: ${{ github.token }}
39
+
40
+ - name: Create or Update Draft Release
41
+ uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
42
+ with:
43
+ tag_name: next-release
44
+ name: 'Next Release (Draft)'
45
+ body: |
46
+ ${{ steps.changelog.outputs.content }}
47
+
48
+ ---
49
+ *This is an automatically generated draft release.*
50
+ draft: true
51
+ prerelease: false
@@ -0,0 +1,76 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ tag_name:
7
+ description: 'Tag name for the publish (e.g., v1.2.3)'
8
+ required: true
9
+ type: string
10
+ workflow_call:
11
+ inputs:
12
+ tag_name:
13
+ description: 'Tag name for the publish (e.g., v1.2.3)'
14
+ required: true
15
+ type: string
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ build:
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
25
+ with:
26
+ persist-credentials: false
27
+ ref: ${{ inputs.tag_name || github.event.inputs.tag_name }}
28
+ fetch-depth: 0
29
+
30
+ - name: Output build information
31
+ env:
32
+ TAG_NAME:
33
+ ${{ inputs.tag_name || github.event.inputs.tag_name }}
34
+ run: |
35
+ echo "### Publishing Build :package:" >> $GITHUB_STEP_SUMMARY
36
+ echo "- **Version tag**: $TAG_NAME" >> $GITHUB_STEP_SUMMARY
37
+
38
+ - name: Install uv
39
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
40
+ with:
41
+ python-version: '3.14.3'
42
+ enable-cache: 'true'
43
+
44
+ - name: Install dependencies
45
+ run: uv sync --frozen
46
+
47
+ - name: Build distribution
48
+ run: uv build
49
+
50
+ - name: Upload build artifacts
51
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
52
+ with:
53
+ name: python-package-distributions
54
+ path: dist/
55
+
56
+ publish-to-pypi:
57
+ needs: build
58
+ runs-on: ubuntu-latest
59
+ # Set the repository variable PUBLISH_TO_PYPI to "true" once the
60
+ # 'pypi' environment and PyPI trusted publishing are configured.
61
+ if: vars.PUBLISH_TO_PYPI == 'true'
62
+ environment: pypi
63
+ permissions:
64
+ id-token: write
65
+
66
+ steps:
67
+ - name: Download build artifacts
68
+ uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
69
+ with:
70
+ name: python-package-distributions
71
+ path: dist/
72
+
73
+ - name: Publish to PyPI
74
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
75
+ with:
76
+ packages-dir: dist/
@@ -0,0 +1,98 @@
1
+ name: Publish to TestPyPI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+ inputs:
9
+ tag_name:
10
+ description: 'Tag name for the publish (e.g., v1.2.3)'
11
+ required: false
12
+ type: string
13
+ workflow_call:
14
+ inputs:
15
+ tag_name:
16
+ description: 'Tag name for the publish (e.g., v1.2.3)'
17
+ required: false
18
+ type: string
19
+
20
+ permissions:
21
+ contents: read
22
+
23
+ jobs:
24
+ build:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
28
+ with:
29
+ persist-credentials: false
30
+ ref: ${{ inputs.tag_name || github.sha }}
31
+ fetch-depth: 0
32
+
33
+ - name: Output build information
34
+ env:
35
+ TAG_NAME: ${{ inputs.tag_name || github.sha }}
36
+ run: |
37
+ echo "### Publishing Build :package:" >> $GITHUB_STEP_SUMMARY
38
+ echo "- **Version tag**: $TAG_NAME" >> $GITHUB_STEP_SUMMARY
39
+
40
+ - name: Install uv
41
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
42
+ with:
43
+ python-version: '3.14.3'
44
+ enable-cache: 'true'
45
+
46
+ - name: Install dependencies
47
+ run: uv sync --group build --frozen
48
+
49
+ - name: Set version for publishing
50
+ env:
51
+ # Resolved in `env:` rather than in `run:` so the
52
+ # user-supplied tag name can never be interpreted by the
53
+ # shell (zizmor: template-injection).
54
+ TAG_NAME: ${{ inputs.tag_name }}
55
+ run: |
56
+ if [ -n "$TAG_NAME" ]; then
57
+ # Use the tag, stripping 'v' prefix if present
58
+ VERSION=$(echo "$TAG_NAME" | sed 's/^v//')
59
+ else
60
+ # For untagged builds, use a dev version without local part
61
+ # Get the dev version from hatch-vcs, then strip +local
62
+ VERSION=$(uv run --frozen hatch version | sed 's/+.*//')
63
+ fi
64
+
65
+ # Update pyproject.toml with sed
66
+ sed -i "s/dynamic = \[\"version\"\]/version = \"$VERSION\"\ndynamic = []/" pyproject.toml
67
+
68
+ - name: Build distribution
69
+ run: uv build
70
+
71
+ - name: Upload build artifacts
72
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
73
+ with:
74
+ name: python-package-distributions
75
+ path: dist/
76
+
77
+ publish-to-testpypi:
78
+ needs: build
79
+ runs-on: ubuntu-latest
80
+ # Set the repository variable PUBLISH_TO_TESTPYPI to "true" once the
81
+ # 'testpypi' environment and TestPyPI trusted publishing are configured.
82
+ if: vars.PUBLISH_TO_TESTPYPI == 'true'
83
+ environment: testpypi
84
+ permissions:
85
+ id-token: write
86
+
87
+ steps:
88
+ - name: Download build artifacts
89
+ uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
90
+ with:
91
+ name: python-package-distributions
92
+ path: dist/
93
+
94
+ - name: Publish to TestPyPI
95
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
96
+ with:
97
+ repository-url: https://test.pypi.org/legacy/
98
+ packages-dir: dist/
@@ -0,0 +1,59 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ tag_name:
7
+ description: 'Tag name for the release (e.g., v1.2.3)'
8
+ required: true
9
+ type: string
10
+ workflow_call:
11
+ inputs:
12
+ tag_name:
13
+ description: 'Tag name for the release (e.g., v1.2.3)'
14
+ required: true
15
+ type: string
16
+
17
+ permissions:
18
+ contents: write
19
+
20
+ jobs:
21
+ release:
22
+ runs-on: ubuntu-latest
23
+ permissions:
24
+ contents: write
25
+ steps:
26
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
27
+ with:
28
+ persist-credentials: false
29
+ fetch-depth: 0
30
+ ref: ${{ inputs.tag_name || github.event.inputs.tag_name }}
31
+
32
+ - name: Generate changelog
33
+ id: changelog
34
+ uses: orhun/git-cliff-action@a9a95522b26fe6403f7bb24031f21fb573d0f5ff # v4.9.1
35
+ with:
36
+ config: cliff.toml
37
+ args: --current --verbose
38
+ env:
39
+ OUTPUT: CHANGELOG.md
40
+
41
+ - name: Delete draft release
42
+ continue-on-error: true
43
+ run: |
44
+ gh release delete next-release --yes
45
+ env:
46
+ GH_TOKEN: ${{ github.token }}
47
+
48
+ - name: Create Release
49
+ uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
50
+ with:
51
+ tag_name:
52
+ ${{ inputs.tag_name || github.event.inputs.tag_name }}
53
+ body: ${{ steps.changelog.outputs.content }}
54
+ draft: false
55
+ prerelease:
56
+ ${{ contains(inputs.tag_name ||
57
+ github.event.inputs.tag_name, 'alpha') ||
58
+ contains(inputs.tag_name || github.event.inputs.tag_name,
59
+ 'beta') }}