This repository was archived by the owner on Jan 4, 2025. It is now read-only.
File tree 4 files changed +79
-99
lines changed
4 files changed +79
-99
lines changed Original file line number Diff line number Diff line change
1
+ name : " Release"
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " *"
7
+
8
+ jobs :
9
+ release :
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ contents : write
13
+ steps :
14
+ - uses : actions/checkout@v3
15
+ - uses : actions/setup-go@v3
16
+ with :
17
+ go-version : ' 1.20'
18
+
19
+ - run : go mod tidy
20
+ - run : go mod verify
21
+ - run : GOOS=windows GOARCH=amd64 go build -a -tags netgo -installsuffix netgo --ldflags '-extldflags "-static"' -o windows-gowl.exe
22
+ - run : GOOS=darwin GOARCH=amd64 go build -a -tags netgo -installsuffix netgo --ldflags '-extldflags "-static"' -o mac-gowl
23
+ - run : GOOS=linux GOARCH=amd64 go build -a -tags netgo -installsuffix netgo --ldflags '-extldflags "-static"' -o linux-gowl
24
+ - run : tar zfc dist/gowl-${{ github.ref }}-x86_64-windows.tar.gz windows-gowl.exe
25
+ - run : tar zfc dist/gowl-${{ github.ref }}-x86_64-darwin.tar.gz mac-gowl
26
+ - run : tar zfc dist/gowl-${{ github.ref }}-x86_64-linux.tar.gz linux-gowl
27
+
28
+ - name : Create Release
29
+ id : create_release
30
+ uses : softprops/action-gh-release@v1
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
+ with :
34
+ draft : true
35
+ files : |
36
+ dist/gowl-${{ github.ref }}-x86_64-windows.tar.gz
37
+ dist/gowl-${{ github.ref }}-x86_64-darwin.tar.gz
38
+ dist/gowl-${{ github.ref }}-x86_64-linux.tar.gz
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -161,31 +161,12 @@ alias cdg "cd (gowl list | fzf)"
161
161
162
162
### Release
163
163
164
- #### Requirements
164
+ > Requirements: [ Task ]
165
165
166
- * make
167
- * bash
168
- * ghr
166
+ [ Task ] : https://github.com/go-task/task
169
167
170
-
171
- #### Packaging
172
-
173
- Confirm that your branch name equals release version, then...
168
+ Confirm that your branch name is mater. then...
174
169
175
170
```
176
- $ make release
171
+ $ task release VERSION=x.y.z
177
172
```
178
-
179
- #### Merge
180
-
181
- 1 . Create PR
182
- 2 . Merge PR to master
183
- 3 . Checkout master
184
- 4 . Pull
185
-
186
- #### deploy
187
-
188
- ```
189
- $ make deploy version=x.y.z
190
- ```
191
-
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ tasks :
4
+ default :
5
+ - task : help
6
+
7
+ help :
8
+ silent : true
9
+ cmds :
10
+ - task -l
11
+
12
+ ci :
13
+ desc : For CI
14
+ cmds :
15
+ - go mod tidy
16
+ - go mod verify
17
+ - go build
18
+ - go test
19
+
20
+ release :
21
+ desc : |
22
+ Build
23
+ ∟ [Ex] task release VERSION=1.2.3
24
+ ∟ [Ex] task release VERSION=1.2.3-beta
25
+ deps :
26
+ - ci
27
+ cmds :
28
+ - sed -i -r 's/const version = ".+"/const version = "{{.VERSION}}"/g' args.go
29
+ - task : ci
30
+ - git add args.go
31
+ - git commit -m 'Version {{.VERSION}}'
32
+ - git tag v{{.VERSION}} -m v{{.VERSION}}
33
+ - git push --tags
34
+ - git push
35
+ preconditions :
36
+ - sh : " [ {{.VERSION}} != '' ]"
37
+ msg : " VERSION is required."
You can’t perform that action at this time.
0 commit comments