Skip to content

Commit 7a5b15c

Browse files
committed
feat: automatically release on new cocogitto release
1 parent 6fbda0a commit 7a5b15c

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/Release.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Autobump
22

33
on:
44
workflow_dispatch:
5+
repository_dispatch:
6+
types: [cocogitto-released]
57

68
jobs:
79
release:
@@ -12,6 +14,16 @@ jobs:
1214
with:
1315
fetch-depth: 0
1416

17+
- name: Update cocogitto version
18+
if: github.event_name == 'repository_dispatch' && github.event.action == 'cocogitto-released'
19+
run: |
20+
VERSION="${{ github.event.client_payload.version }}"
21+
echo "Updating version.env to use cocogitto version: $VERSION"
22+
echo "VERSION=$VERSION" > version.env
23+
git add version.env
24+
git commit -m "feat: update cocogitto to $VERSION"
25+
git push
26+
1527
- name: SemVer release
1628
id: release
1729
uses: cocogitto/cocogitto-action@main

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
CUR_DIR=$(pwd)
4-
VERSION=6.4.0
4+
. "$(dirname "$0")/version.env"
55
BIN_DIR="$HOME/.local/bin"
66

77
PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]')

version.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VERSION=6.4.0

0 commit comments

Comments
 (0)