diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 44f9cd1..72f2215 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -46,6 +46,8 @@ jobs: npm run lint - name: Update version run: | + user="giteaAdmin" + mail="gitea@local.domain" chmod +x update-version.sh ./update-version.sh patch - name: Build and push diff --git a/update-version.sh b/update-version.sh index cc1e2a4..71c4ed4 100644 --- a/update-version.sh +++ b/update-version.sh @@ -14,3 +14,11 @@ echo "New version: $new_version" # Update package.json jq ".version = \"$new_version\"" package.json > temp.json && mv temp.json package.json + +# Optional: Commit and tag +git config --global user.email ${email} +git config --global user.name ${user} +git add package.json +git commit -m "Bump version to $new_version" +git tag -a "v$new_version" -m "Release version $new_version" +git push main HEAD --tags \ No newline at end of file