-
Notifications
You must be signed in to change notification settings - Fork 3
chore: adopt Data Services Versioning Standard #680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1fec361
chore: adopt Data Services Versioning Standard
jirhiker d8e2d2d
chore: regenerate uv.lock for project version 1.0.0
jirhiker 398f078
Merge remote-tracking branch 'origin/staging' into chore/adopt-versio…
jirhiker 562753c
chore: enable release-please prereleases (rc) + broaden CD tag trigger
jirhiker 6b008c8
Potential fix for pull request finding
jirhiker 36c1b0f
chore: pass APP_VERSION through staging + testing deploys
jirhiker a09658d
Potential fix for pull request finding
jirhiker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| name: hotfix-start | ||
|
|
||
| # Creates a hotfix branch off a release tag per the Data Services Versioning | ||
| # Standard §10. Workflow: | ||
| # 1. Run this workflow (optionally pin base_tag; default = latest v*.*.*). | ||
| # 2. Push fix commit(s) to the new hotfix/vX.Y.(Z+1) branch via PR. | ||
| # 3. release-please opens a Release PR on the hotfix branch. | ||
| # 4. Merge it -> tag vX.Y.(Z+1) -> CD (Production) deploys. | ||
| # 5. Open a forward-merge PR from hotfix/vX.Y.(Z+1) back into production. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| base_tag: | ||
| description: 'Release tag to branch from (e.g. v1.4.2). Empty = latest v*.*.* tag.' | ||
| required: false | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| create-hotfix-branch: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6.0.3 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Resolve base tag | ||
| id: base | ||
| run: | | ||
| BASE="${{ inputs.base_tag }}" | ||
| if [ -z "$BASE" ]; then | ||
| BASE="$(git tag --list 'v*.*.*' --sort=-v:refname | head -n1)" | ||
| fi | ||
|
Comment on lines
+34
to
+36
|
||
| if [ -z "$BASE" ]; then | ||
| echo "No release tag found (expected v*.*.* tags)." >&2 | ||
| exit 1 | ||
| fi | ||
| if ! git rev-parse -q --verify "refs/tags/$BASE" >/dev/null; then | ||
| echo "Tag $BASE not found in repo." >&2 | ||
| exit 1 | ||
| fi | ||
| echo "tag=$BASE" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Compute next PATCH version + branch name | ||
| id: next | ||
| run: | | ||
| BASE="${{ steps.base.outputs.tag }}" | ||
| VER="${BASE#v}" | ||
| IFS='.' read -r MAJ MIN PAT <<<"$VER" | ||
| if ! [[ "$MAJ" =~ ^[0-9]+$ && "$MIN" =~ ^[0-9]+$ && "$PAT" =~ ^[0-9]+$ ]]; then | ||
| echo "Base tag $BASE is not strict SemVer vX.Y.Z." >&2 | ||
| exit 1 | ||
| fi | ||
| NEXT_VER="${MAJ}.${MIN}.$((PAT+1))" | ||
| BRANCH="hotfix/v${NEXT_VER}" | ||
| echo "version=${NEXT_VER}" >> "$GITHUB_OUTPUT" | ||
| echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Guard against existing branch | ||
| run: | | ||
| if git ls-remote --exit-code --heads origin "${{ steps.next.outputs.branch }}" >/dev/null 2>&1; then | ||
| echo "Branch ${{ steps.next.outputs.branch }} already exists on origin. Aborting." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Create + push hotfix branch | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git checkout -b "${{ steps.next.outputs.branch }}" "${{ steps.base.outputs.tag }}" | ||
| git push origin "${{ steps.next.outputs.branch }}" | ||
|
|
||
| - name: Summary | ||
| run: | | ||
| { | ||
| echo "### Hotfix branch ready" | ||
| echo "" | ||
| echo "- Base tag: \`${{ steps.base.outputs.tag }}\`" | ||
| echo "- New branch: \`${{ steps.next.outputs.branch }}\`" | ||
| echo "- Target version: \`v${{ steps.next.outputs.version }}\`" | ||
| echo "" | ||
| echo "Next steps:" | ||
| echo "1. Open a fix PR targeting \`${{ steps.next.outputs.branch }}\` (Conventional Commit title, \`fix:\` prefix)." | ||
| echo "2. After merge, release-please will open a Release PR on the hotfix branch." | ||
| echo "3. Merge the Release PR -> tag \`v${{ steps.next.outputs.version }}\` -> CD (Production) deploys." | ||
| echo "4. Open a forward-merge PR \`${{ steps.next.outputs.branch }}\` -> \`production\`." | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: pr-title-lint | ||
|
|
||
| # Enforces Conventional Commits on PR titles so squash-merged commits drive | ||
| # release-please correctly. See Data Services Versioning Standard §7. | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, edited, reopened, synchronize] | ||
|
|
||
| permissions: | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: amannn/action-semantic-pull-request@v5 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| types: | | ||
| feat | ||
| fix | ||
| perf | ||
| docs | ||
| chore | ||
| refactor | ||
| test | ||
| ci | ||
| build | ||
| style | ||
| revert | ||
| deps | ||
| requireScope: false | ||
| subjectPattern: ^(?![A-Z]).+$ | ||
| subjectPatternError: | | ||
| PR title subject must start with a lowercase letter. | ||
| Example: `feat: add /wells/{id}/assets endpoint` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: release-please | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - production | ||
| - 'hotfix/v*' | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| release-please: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: googleapis/release-please-action@v4 | ||
| with: | ||
| config-file: release-please-config.json | ||
| manifest-file: .release-please-manifest.json | ||
| target-branch: ${{ github.ref_name }} |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "1.0.0" | ||
| } |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
| "release-type": "python", | ||
| "include-v-in-tag": true, | ||
| "include-component-in-tag": false, | ||
| "bump-minor-pre-major": false, | ||
| "bump-patch-for-minor-pre-major": false, | ||
| "changelog-sections": [ | ||
| { "type": "feat", "section": "Features" }, | ||
| { "type": "fix", "section": "Bug Fixes" }, | ||
| { "type": "perf", "section": "Performance" }, | ||
| { "type": "deps", "section": "Dependencies" }, | ||
| { "type": "revert", "section": "Reverts" }, | ||
| { "type": "docs", "section": "Documentation", "hidden": true }, | ||
| { "type": "chore", "section": "Chores", "hidden": true }, | ||
| { "type": "refactor", "section": "Refactors", "hidden": true }, | ||
| { "type": "test", "section": "Tests", "hidden": true }, | ||
| { "type": "build", "section": "Build", "hidden": true }, | ||
| { "type": "ci", "section": "CI", "hidden": true }, | ||
| { "type": "style", "section": "Style", "hidden": true } | ||
| ], | ||
| "packages": { | ||
| ".": { | ||
| "package-name": "OcotilloAPI", | ||
| "prerelease": true, | ||
| "prerelease-type": "rc" | ||
| } | ||
|
Comment on lines
+23
to
+27
Comment on lines
+23
to
+27
|
||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.