File tree 5 files changed +148
-19
lines changed
5 files changed +148
-19
lines changed Original file line number Diff line number Diff line change
1
+ name : build
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - dev
8
+
9
+ concurrency : ${{ github.workflow }}-${{ github.ref }}
10
+
11
+ permissions :
12
+ contents : write
13
+ packages : write
14
+
15
+ jobs :
16
+ build :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@v3
20
+ with :
21
+ fetch-depth : 0
22
+ - uses : oven-sh/setup-bun@v1
23
+ with :
24
+ bun-version : latest
25
+
26
+ - run : |
27
+ npm config set //registry.npmjs.org/:_authToken $NODE_AUTH_TOKEN
28
+ npm whoami
29
+ env:
30
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31
+
32
+ - run : git fetch --force --tags
33
+
34
+ - uses : actions/setup-go@v5
35
+ with :
36
+ go-version : " >=1.23.2"
37
+
38
+ - name : Go Mod
39
+ run : go mod download
40
+
41
+ # TODO remove temporary workaround
42
+ - run : bun i --frozen-lockfile
43
+ - run : git reset --hard
44
+ - run : cd platform && bun tsc --noEmit
45
+ - run : ./platform/scripts/build
46
+ - uses : goreleaser/goreleaser-action@v6
47
+ with :
48
+ distribution : goreleaser
49
+ version : latest
50
+ args : build --snapshot --clean
Original file line number Diff line number Diff line change
1
+ name : release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - opencode
8
+ tags :
9
+ - " *"
10
+
11
+ concurrency : ${{ github.workflow }}-${{ github.ref }}
12
+
13
+ permissions :
14
+ contents : write
15
+ packages : write
16
+
17
+ jobs :
18
+ goreleaser :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : actions/checkout@v3
22
+ with :
23
+ fetch-depth : 0
24
+
25
+ - run : git fetch --force --tags
26
+
27
+ - uses : actions/setup-go@v5
28
+ with :
29
+ go-version : " >=1.23.2"
30
+
31
+ - run : go mod download
32
+ - uses : goreleaser/goreleaser-action@v6
33
+ with :
34
+ distribution : goreleaser
35
+ version : latest
36
+ args : release --clean
37
+ env :
38
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
+ AUR_KEY : ${{ secrets.AUR_KEY }}
Original file line number Diff line number Diff line change 1
1
version : 2
2
- project_name : sst
2
+ project_name : opencode
3
3
before :
4
4
hooks :
5
- - go mod tidy
6
- - go test ./cmd/... ./pkg/...
7
5
builds :
8
6
- env :
9
7
- CGO_ENABLED=0
10
8
goos :
11
9
- linux
12
10
- darwin
13
- main : ./cmd/sst
11
+ main : ./main.go
14
12
15
13
archives :
16
14
- format : tar.gz
17
15
# this name template makes the OS and Arch compatible with the results of uname.
18
16
name_template : >-
19
- sst -
17
+ opencode -
20
18
{{- if eq .Os "darwin" }}mac-
21
19
{{- else if eq .Os "windows" }}windows-
22
20
{{- else if eq .Os "linux" }}linux-{{end}}
@@ -33,20 +31,20 @@ checksum:
33
31
snapshot :
34
32
name_template : " 0.0.0-{{ .Timestamp }}"
35
33
aurs :
36
- - homepage : " https://github.com/sst/sst "
34
+ - homepage : " https://github.com/opencode-ai/opencode "
37
35
description : " Deploy anything"
38
36
private_key : " {{ .Env.AUR_KEY }}"
39
- git_url :
" ssh://[email protected] /sst-bin .git"
37
+ git_url :
" ssh://[email protected] /opencode .git"
40
38
license : " MIT"
41
39
package : |-
42
- install -Dm755 ./sst "${pkgdir}/usr/bin/sst "
40
+ install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode "
43
41
brews :
44
42
- repository :
45
- owner : sst
43
+ owner : opencode-ai
46
44
name : homebrew-tap
47
45
nfpms :
48
- - maintainer : sst
49
- description : the sst cli
46
+ - maintainer : opencode
47
+ description : terminal based agent that can build anything
50
48
formats :
51
49
- deb
52
50
- rpm
@@ -55,14 +53,6 @@ nfpms:
55
53
{{- if eq .Os "darwin" }}mac
56
54
{{- else }}{{ .Os }}{{ end }}-{{ .Arch }}
57
55
58
- # scoop:
59
- # bucket:
60
- # owner: sst
61
- # name: scoop-bucket
62
- # homepage: "https://github.com/sst/ion"
63
- # description: "sst cli"
64
- # license: Apache 2.0
65
-
66
56
changelog :
67
57
sort : asc
68
58
filters :
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Parse command line arguments
4
+ minor=false
5
+ while [ " $# " -gt 0 ]; do
6
+ case " $1 " in
7
+ --minor) minor=true; shift 1;;
8
+ * ) echo " Unknown parameter: $1 " ; exit 1;;
9
+ esac
10
+ done
11
+
12
+ git fetch --force --tags
13
+
14
+ # Get the latest Git tag
15
+ latest_tag=$( git tag --sort=committerdate | grep -E ' [0-9]' | tail -1)
16
+
17
+ # If there is no tag, exit the script
18
+ if [ -z " $latest_tag " ]; then
19
+ echo " No tags found"
20
+ exit 1
21
+ fi
22
+
23
+ echo " Latest tag: $latest_tag "
24
+
25
+ # Split the tag into major, minor, and patch numbers
26
+ IFS=' .' read -ra VERSION <<< " $latest_tag"
27
+
28
+ if [ " $minor " = true ]; then
29
+ # Increment the minor version and reset patch to 0
30
+ minor_number=${VERSION[1]}
31
+ let " minor_number++"
32
+ new_version=" ${VERSION[0]} .$minor_number .0"
33
+ else
34
+ # Increment the patch version
35
+ patch_number=${VERSION[2]}
36
+ let " patch_number++"
37
+ new_version=" ${VERSION[0]} .${VERSION[1]} .$patch_number "
38
+ fi
39
+
40
+ echo " New version: $new_version "
41
+
42
+ git tag $new_version
43
+ git push --tags
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -e
3
+ export DOCKER_PUSH=true
4
+ ./platform/scripts/build
5
+ goreleaser build --clean --snapshot --skip validate
6
+ cd sdk/js
7
+ bun run release
You can’t perform that action at this time.
0 commit comments