-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.drone.yml
140 lines (132 loc) · 3.52 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
kind: pipeline
type: kubernetes
name: build
steps:
- name: lint-test
image: golang:1.23.1
environment:
CGO_ENABLED: 1
commands:
- TEST_RESULT=$(gofmt -l ./)
- printf "Test Result:\n"
- echo "$${TEST_RESULT}"
- test -z $${TEST_RESULT}
- name: build-fyne-cli
image: golang:1.23.1-bookworm
#image: fyneio/fyne-cross-images:linux
environment:
CGO_ENABLED: 1
CC: "gcc"
GOOS: linux
GOARCH: amd64
GOBIN: /drone/src/bin/
commands:
- mkdir -p mkdir -p /drone/src/dist/
- apt-get update
- apt-get install -y -q gcc build-essential libgl1-mesa-dev xorg-dev libfuse2
- go get fyne.io/fyne/v2@latest
- go install fyne.io/fyne/v2/cmd/fyne@latest
when:
status:
- success
event:
- tag
depends_on:
- lint-test
# - name: build-windows
# image: golang:1.23.1-bookworm
# #image: fyneio/fyne-cross-images:windows
# environment:
# CGO_ENABLED: 1
# CC: "x86_64-w64-mingw32-gcc"
# GOOS: windows
# GOARCH: amd64
# GOBIN: /drone/src/bin/
# commands:
# - mkdir -p /drone/src/dist/
# - apt-get update
# - apt-get install -y -q --no-install-recommends gcc build-essential libgl1-mesa-dev xorg-dev libfuse2 mingw-w64
# - $$GOBIN/fyne package --release --executable "/drone/src/dist/windows/Whispering Tiger.exe"
# when:
# status:
# - success
# event:
# - tag
# depends_on:
# - build-fyne-cli
- name: build-linux
image: golang:1.23.1-bookworm
#image: fyneio/fyne-cross-images:linux
environment:
CGO_ENABLED: 1
CC: "gcc"
GOOS: linux
GOARCH: amd64
GOBIN: /drone/src/bin/
commands:
- mkdir -p mkdir -p /drone/src/dist/
- apt-get update
- apt-get install -y -q gcc build-essential libgl1-mesa-dev xorg-dev libfuse2
- $$GOBIN/fyne package --release
- ls -lah /drone/src/
when:
status:
- success
event:
- tag
depends_on:
- build-fyne-cli
- name: upload-build-s3
image: minio/mc
environment:
SRCDIR: /drone/src
MINIO_HOST:
from_secret: s3-endpoint-s3
MINIO_ACCESS_KEY:
from_secret: s3-access-key-s3
MINIO_SECRET_KEY:
from_secret: s3-secret-key-s3
commands:
- mc alias set s3_alias $${MINIO_HOST} $${MINIO_ACCESS_KEY} $${MINIO_SECRET_KEY}
- DIST_DIR="./dist"
#- mc cp "$${SRCDIR}/Whispering Tiger.exe" s3_alias/projects/whispering-ui/
- mc cp "$${SRCDIR}/Whispering Tiger.tar.xz" s3_alias/projects/whispering-ui/
when:
event:
- tag
depends_on:
#- build-windows
- build-linux
# - name: git-release-windows
# image: plugins/gitea-release
# settings:
# api_key:
# from_secret: docker_password
# base_url: ${DRONE_REPO_LINK}
# files: "/drone/src/dist/Whispering Tiger.exe"
# when:
# event:
# - tag
# depends_on:
# - build-windows
- name: git-release-linux
image: plugins/gitea-release
#image: woodpeckerci/plugin-release
settings:
api_key:
from_secret: docker_password
base_url: ${DRONE_REPO_LINK}
files:
- '/drone/src/Whispering Tiger.tar.xz'
when:
event:
- tag
depends_on:
- build-linux
trigger:
# event:
# - push
ref:
exclude:
- refs/pipelines/*