summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-07-31 01:20:12 -0400
committerDax Raad <[email protected]>2025-07-31 01:20:12 -0400
commit50be2aee39289b7e05299e61d53478736ab914cc (patch)
treea1872021c4b7c7c36f3670e5c5064422f74df0b6
parent0bdbe6261a8abbbef72345c03c44431976e9ca1a (diff)
downloadopencode-50be2aee39289b7e05299e61d53478736ab914cc.tar.gz
opencode-50be2aee39289b7e05299e61d53478736ab914cc.zip
ci tweaks
-rw-r--r--.github/workflows/publish.yml1
-rwxr-xr-xscripts/release15
2 files changed, 7 insertions, 9 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index ac09928cf..8a5a74bcc 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -52,7 +52,6 @@ jobs:
run: |
bun install
OPENCODE_VERSION=${{ inputs.version }} ./script/publish.ts
- working-directory: ./packages/opencode
env:
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
diff --git a/scripts/release b/scripts/release
index 4a316fb53..631cd5a7b 100755
--- a/scripts/release
+++ b/scripts/release
@@ -9,10 +9,8 @@ while [ "$#" -gt 0 ]; do
esac
done
-git fetch --force --tags
-
-# Get the latest Git tag
-latest_tag=$(git tag --sort=committerdate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | tail -1)
+# Get the latest release from GitHub
+latest_tag=$(gh release list --limit 1 --json tagName --jq '.[0].tagName')
# If there is no tag, exit the script
if [ -z "$latest_tag" ]; then
@@ -22,8 +20,9 @@ fi
echo "Latest tag: $latest_tag"
-# Split the tag into major, minor, and patch numbers
-IFS='.' read -ra VERSION <<< "$latest_tag"
+# Remove the 'v' prefix and split into major, minor, and patch numbers
+version_without_v=${latest_tag#v}
+IFS='.' read -ra VERSION <<< "$version_without_v"
if [ "$minor" = true ]; then
# Increment the minor version and reset patch to 0
@@ -39,5 +38,5 @@ fi
echo "New version: $new_version"
-git tag $new_version
-git push --tags
+gh workflow run publish.yml -f version="$new_version"
+