Initial commit

This commit is contained in:
Charles Click 2024-04-01 23:34:32 -05:00
commit 9a108187e1
4 changed files with 74 additions and 0 deletions

24
.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# ---> Go
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
build/*
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
# Go workspace file
go.work

38
.woodpecker.yaml Normal file
View File

@ -0,0 +1,38 @@
steps:
- name: build-release
image: golang
when:
- event: tag
commands:
- GOOS=linux GOARCH=amd64 go build -o build/${CI_REPO_NAME}.linux.amd64
- GOOS=windows GOARCH=amd64 go build -o build/${CI_REPO_NAME}.windows.amd64.exe
- GOOS=darwin GOARCH=amd64 go build -o build/${CI_REPO_NAME}.darwin.amd64
- name: deploy-build
image: alpine
when:
- event: tag
environment:
GITEATKN:
from_secret: GITEA_TOKEN
GOTOKEN:
from_secret: GOTIFY_TOKEN
depends_on: build-release
commands:
- apk add tea
- apk add wget
- tea login add --name=temp --url=https://git.vertinext.com/ --token=$GITEATKN
- tea releases create --asset "build/${CI_REPO_NAME}.linux.amd64" --asset "build/${CI_REPO_NAME}.windows.amd64.exe" --asset "build/${CI_REPO_NAME}.darwin.amd64" --tag ${CI_COMMIT_TAG} --title "Latest Compiled Release" --note "Testing GO Build CI"
- wget "https://gotify.vertinext.com/message?token=$GOTOKEN" --post-data "title=${CI} - ${CI_REPO_NAME}&message=New release ${CI_COMMIT_TAG} built and deployed.&priority=0" -O /dev/null
- name: notify-on-branch-push
image: alpine
when:
- event: [push, pull_request, tag, release]
- status: [success, failure]
environment:
GOTOKEN:
from_secret: GOTIFY_TOKEN
commands:
- apk add wget
- wget "https://gotify.vertinext.com/message?token=$GOTOKEN" --post-data "title=${CI} - ${CI_REPO_NAME}&message=New ${CI_PIPELINE_EVENT} to ${CI_REPO_NAME}/${CI_COMMIT_BRANCH}.&priority=0" -O /dev/null

9
LICENSE Normal file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2024 roryejinn
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# GoTemplate
A GoTemplate setup with CI integration