From 7c5ce471bd19d663272696825b3766446c61c916 Mon Sep 17 00:00:00 2001 From: Deac Date: Fri, 29 May 2026 11:43:02 -0400 Subject: [PATCH] add versioning --- .gitea/workflows/publish.yaml | 29 +++++++++++++++++++++++++++++ Makefile | 23 +++++++++++++---------- VERSION | 1 + 3 files changed, 43 insertions(+), 10 deletions(-) create mode 100644 .gitea/workflows/publish.yaml create mode 100644 VERSION diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml new file mode 100644 index 0000000..04f4fe5 --- /dev/null +++ b/.gitea/workflows/publish.yaml @@ -0,0 +1,29 @@ +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Bump minor version + run: | + version=$(cat VERSION) + IFS='.' read -r major minor patch <<< "$version" + echo "${major}.$((minor + 1)).0" > VERSION + + - name: Commit and tag + run: | + git config user.name "gitea-actions" + git config user.email "actions@noreply.gitea.pixelparasol.com" + git add VERSION + git diff --cached --quiet || git commit -m "chore: bump version [skip ci]" + version=$(cat VERSION) + git tag "v${version}" + git push + git push --tags diff --git a/Makefile b/Makefile index f6afcab..ed2c1f4 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,17 @@ ACTIONS := \ - .gitea/actions/docker \ - .gitea/actions/node \ - .gitea/actions/git/create_tag \ - .gitea/actions/helm/diff \ - .gitea/actions/helm/set_deployment_image \ - .gitea/actions/helm/template \ - .gitea/actions/infra/update_version \ - .gitea/actions/kubectl/configure \ - .gitea/actions/trivy/image_scan \ - .gitea/actions/trivy/namespace_scan + docker \ + node \ + git/create_tag \ + helm/diff \ + helm/set_deployment_image \ + helm/template \ + helm/upgrade \ + infisical/fetch-secret \ + infra/update_version \ + kubectl/configure \ + test/npm \ + trivy/image_scan \ + trivy/namespace_scan .PHONY: help docs diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..3eefcb9 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0.0