Skip to content
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

Update version #179

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/tag_on_version_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Tag

on:
pull_request:
branches:
- main
paths:
- "internal/version/version.go"
types:
- closed
push:

jobs:
new_tag:
# if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Bump version and push tag
id: check
uses: anothrNick/github-tag-action@1.71.0
env:
DRY_RUN: true
DEFAULT_BUMP: patch

- name: check tag
id: version
run: |
echo "in_file=$(cat internal/version/version.go | grep "^var Version = " | cut -d ' ' -f4 | tr -d "\"")" >> $GITHUB_OUTPUT

- uses: jackbilestech/semver-compare@1.0.4
id: compare
with:
head: ${{steps.version.outputs.in_file}}
base: ${{steps.check.outputs.old_tag}}
operator: '>'

- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.71.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: "V${{steps.version.outputs.in_file}}"
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

// The version in the current branch
var Version = "1.12.0"
var Version = "1.13.0"

// If this is "" (empty string) then it means that it is a final release.
// Otherwise, this is a pre-release e.g. "dev", "beta", "rc1", etc.
Expand Down
Loading