Skip to content

Commit 43ff388

Browse files
committed
Start GitHub CI
1 parent 2d88ab9 commit 43ff388

File tree

4 files changed

+294
-116
lines changed

4 files changed

+294
-116
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Build and Snapshot Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
schedule:
9+
- cron: '0 0 * * 0' # Weekly on Sunday at midnight
10+
workflow_dispatch: # Allows manual triggering
11+
12+
jobs:
13+
build:
14+
name: Build and Test on All Platforms
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
go-version: [">=1.23.5"]
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
25+
- name: Set up Go
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version: ${{ matrix.go-version }}
29+
30+
- name: Install dependencies
31+
run: go mod tidy -e || true
32+
33+
- name: Lint Go files
34+
run: go fmt ./...
35+
36+
- name: Run tests
37+
run: go test ./... -v
38+
39+
- name: Build binary
40+
run: |
41+
mkdir -p dist
42+
if [ "${{ matrix.os }}" == "windows-latest" ]; then
43+
set GOOS=windows
44+
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
45+
export GOOS=darwin
46+
else
47+
export GOOS=linux
48+
fi
49+
GOARCH=amd64
50+
go build -o dist/cf-cli-java-plugin-${GOOS}-${GOARCH}
51+
52+
- name: Upload artifact
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: cf-cli-java-plugin-${{ matrix.os }}
56+
path: dist/
57+
58+
release:
59+
name: Create Snapshot Release
60+
needs: build
61+
runs-on: ubuntu-latest
62+
if: github.event_name == 'push' || github.event_name == 'schedule'
63+
64+
steps:
65+
- name: Download artifacts
66+
uses: actions/download-artifact@v4
67+
with:
68+
name: cf-cli-java-plugin-${{ matrix.os }}
69+
path: dist/
70+
71+
- name: Create GitHub Release
72+
uses: softprops/action-gh-release@v1
73+
with:
74+
files: dist/*
75+
prerelease: true
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Manual Release
2+
3+
on:
4+
workflow_dispatch: # Allows manual triggering
5+
6+
jobs:
7+
release:
8+
name: Create Proper Release on All Platforms
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
go-version: [">=1.23.5"]
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: ${{ matrix.go-version }}
23+
24+
- name: Install dependencies
25+
run: go mod tidy -e || true
26+
27+
- name: Lint Go files
28+
run: go fmt ./...
29+
30+
- name: Run tests
31+
run: go test ./... -v
32+
33+
- name: Build binary
34+
run: |
35+
mkdir -p dist
36+
GOOS=$(echo ${{ matrix.os }} | cut -d'-' -f1)
37+
GOARCH=amd64
38+
go build -o dist/cf-cli-java-plugin-${GOOS}-${GOARCH}
39+
40+
- name: Create GitHub Release
41+
uses: softprops/action-gh-release@v1
42+
with:
43+
files: dist/*
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+

go.mod

Lines changed: 26 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module cf.plugin.ref/requires
22

3-
go 1.22.0
3+
go 1.23.0
44

55
toolchain go1.23.5
66

@@ -16,84 +16,55 @@ require (
1616

1717
require (
1818
code.cloudfoundry.org/bytefmt v0.0.0-20210608160410-67692ebc98de // indirect
19-
code.cloudfoundry.org/clock v1.0.0 // indirect
19+
code.cloudfoundry.org/cli-plugin-repo v0.0.0-20250414213145-88c4afe9cd65 // indirect
20+
code.cloudfoundry.org/go-log-cache v1.0.0 // indirect
21+
code.cloudfoundry.org/go-loggregator v7.4.0+incompatible // indirect
22+
code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f // indirect
23+
code.cloudfoundry.org/jsonry v1.1.4 // indirect
24+
code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78 // indirect
2025
code.cloudfoundry.org/tlsconfig v0.0.0-20210615191307-5d92ef3894a7 // indirect
21-
github.com/BurntSushi/toml v0.3.1 // indirect
26+
code.cloudfoundry.org/ykk v0.0.0-20170424192843-e4df4ce2fd4d // indirect
2227
github.com/SermoDigital/jose v0.9.1 // indirect
2328
github.com/blang/semver v3.5.1+incompatible // indirect
2429
github.com/bmatcuk/doublestar v1.3.4 // indirect
25-
github.com/bramvdbogaerde/go-scp v1.0.0 // indirect
30+
github.com/bmizerany/pat v0.0.0-20210406213842-e4b6760bdd6f // indirect
2631
github.com/charlievieth/fs v0.0.1 // indirect
27-
github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89 // indirect
28-
github.com/chromedp/chromedp v0.9.2 // indirect
29-
github.com/chromedp/sysutil v1.0.0 // indirect
30-
github.com/chzyer/logex v1.2.1 // indirect
31-
github.com/chzyer/readline v1.5.1 // indirect
32-
github.com/chzyer/test v1.0.0 // indirect
3332
github.com/cloudfoundry/bosh-cli v6.4.1+incompatible // indirect
3433
github.com/cloudfoundry/bosh-utils v0.0.264 // indirect
35-
github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e // indirect
36-
github.com/cloudfoundry/socks5-proxy v0.2.12 // indirect
3734
github.com/cppforlife/go-patch v0.2.0 // indirect
38-
github.com/davecgh/go-spew v1.1.1 // indirect
35+
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
3936
github.com/fatih/color v1.12.0 // indirect
4037
github.com/fsnotify/fsnotify v1.4.9 // indirect
41-
github.com/go-logr/logr v1.4.2 // indirect
42-
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
43-
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
44-
github.com/go-yaml/yaml v2.1.0+incompatible // indirect
45-
github.com/gobwas/httphead v0.1.0 // indirect
46-
github.com/gobwas/pool v0.2.1 // indirect
47-
github.com/gobwas/ws v1.2.1 // indirect
48-
github.com/golang/protobuf v1.5.3 // indirect
38+
github.com/golang/protobuf v1.5.4 // indirect
4939
github.com/google/go-cmp v0.6.0 // indirect
50-
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
51-
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c // indirect
52-
github.com/hpcloud/tail v1.0.0 // indirect
53-
github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465 // indirect
40+
github.com/google/go-querystring v1.1.0 // indirect
41+
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
5442
github.com/jessevdk/go-flags v1.5.0 // indirect
55-
github.com/josharian/intern v1.0.0 // indirect
56-
github.com/jpillora/backoff v1.0.0 // indirect
57-
github.com/kr/pretty v0.2.1 // indirect
58-
github.com/kr/pty v1.1.1 // indirect
59-
github.com/kr/text v0.1.0 // indirect
60-
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 // indirect
43+
github.com/kr/pretty v0.3.1 // indirect
6144
github.com/lithammer/fuzzysearch v1.1.8 // indirect
6245
github.com/lunixbochs/vtclean v1.0.0 // indirect
63-
github.com/mailru/easyjson v0.7.7 // indirect
6446
github.com/mattn/go-colorable v0.1.8 // indirect
6547
github.com/mattn/go-isatty v0.0.12 // indirect
6648
github.com/mattn/go-runewidth v0.0.13 // indirect
67-
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
6849
github.com/nxadm/tail v1.4.8 // indirect
6950
github.com/onsi/ginkgo/v2 v2.22.2 // indirect
70-
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde // indirect
71-
github.com/pivotal-cf/paraphernalia v0.0.0-20180203224945-a64ae2051c20 // indirect
72-
github.com/pmezard/go-difflib v1.0.0 // indirect
7351
github.com/rivo/uniseg v0.2.0 // indirect
52+
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
7453
github.com/sirupsen/logrus v1.8.1 // indirect
75-
github.com/square/certstrap v1.2.0 // indirect
76-
github.com/stretchr/objx v0.5.0 // indirect
7754
github.com/stretchr/testify v1.8.4 // indirect
78-
github.com/tedsuo/ifrit v0.0.0-20191009134036-9a97d0632f00 // indirect
79-
github.com/urfave/cli v1.21.0 // indirect
55+
github.com/tedsuo/rata v1.0.0 // indirect
8056
github.com/vito/go-interact v1.0.0 // indirect
81-
github.com/yuin/goldmark v1.4.13 // indirect
82-
golang.org/x/crypto v0.31.0 // indirect
83-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
84-
golang.org/x/mod v0.22.0 // indirect
85-
golang.org/x/net v0.33.0 // indirect
86-
golang.org/x/sync v0.10.0 // indirect
87-
golang.org/x/sys v0.28.0 // indirect
88-
golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 // indirect
89-
golang.org/x/term v0.27.0 // indirect
90-
golang.org/x/text v0.21.0 // indirect
91-
golang.org/x/tools v0.28.0 // indirect
92-
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
93-
google.golang.org/protobuf v1.36.1 // indirect
94-
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
57+
golang.org/x/crypto v0.36.0 // indirect
58+
golang.org/x/net v0.37.0 // indirect
59+
golang.org/x/sys v0.32.0 // indirect
60+
golang.org/x/term v0.30.0 // indirect
61+
golang.org/x/text v0.23.0 // indirect
62+
google.golang.org/genproto v0.0.0-20250414145226-207652e42e2e // indirect
63+
google.golang.org/genproto/googleapis/api v0.0.0-20250409194420-de1ac958c67a // indirect
64+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250409194420-de1ac958c67a // indirect
65+
google.golang.org/grpc v1.71.0 // indirect
66+
google.golang.org/protobuf v1.36.6 // indirect
9567
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
96-
gopkg.in/fsnotify.v1 v1.4.7 // indirect
9768
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
9869
gopkg.in/yaml.v2 v2.4.0 // indirect
9970
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)