created a workflow for updating the version

This commit is contained in:
Jason Schleifer
2024-08-27 11:20:14 +12:00
parent 21d556fe11
commit a8a8f87847
2 changed files with 33 additions and 25 deletions
+27
View File
@@ -0,0 +1,27 @@
name: Update Version
on:
release:
types: [published]
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update js/versions.js
run: |
version=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')
date=$(date +'%Y-%m-%d')
sed -i "s/version: \".*\"/version: \"$version\"/" js/versions.js
sed -i "s/releaseDate: \".*\"/releaseDate: \"$date\"/" js/versions.js
sed -i "/changelog: \[/a\ {\n version: \"$version\",\n date: \"$date\",\n changes: [\n \"New release\"\n ]\n }," js/versions.js
- name: Commit and push if changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
git add js/versions.js
git commit -m "Update version to ${{ github.ref_name }}" || exit 0
git push
+6 -25
View File
@@ -1,6 +1,6 @@
import { getStorageValue, setStorageValue } from "../../scripts/utils.js";
import { versions } from "./versions.js";
export const griptapeMenuItems = [
// // TODO: Figure out how to pull and set the environment variables
// {
@@ -29,32 +29,13 @@ export const griptapeMenuItems = [
},
},
{
content: "----------------",
content: `📦 Version: ${versions.version}`,
disabled: true, // This makes it non-clickable
},
{
content: "----------------------",
disabled: true,
},
// // Set automatic node colors on or off
// {
// content: "🎨 Node Colors On",
// callback: (...args) => {
// setStorageValue(
// "Comfy.Griptape.ColorNodes",
// true
// );
// },
// },
// {
// content: "🎨 Node Colors Off",
// callback: (...args) => {
// setStorageValue(
// "Comfy.Griptape.ColorNodes",
// false
// );
// },
// },
// {
// content: "",
// disabled: true,
// },
{
content: "Griptape Home",
callback: (...args) => {