adding drone
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2024-01-03 10:39:03 +11:00
parent 7629ed05bd
commit 5b4d36f8ba
5 changed files with 51 additions and 0 deletions

14
.drone.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
#set -e
#set -x
# disable CGO for cross-compiling
export CGO_ENABLED=0
export now=$(TZ=Australia/Sydney date '+%Y%m%d-%H%M%S')
echo $now
echo "build commences"
go build -ldflags "-X main.sha1ver=`git rev-parse HEAD` -X main.buildTime=$now" -o api-tester .
echo "build complete"
sha256sum api-tester > api-tester_checksum.txt
ls -lah

27
.drone.yml Normal file
View File

@@ -0,0 +1,27 @@
kind: pipeline
type: docker
name: default
# Docs at https://docs.drone.io/pipeline/exec/overview/
# Also see https://github.com/harness/drone-cli/blob/master/.drone.yml
steps:
- name: build
image: golang
commands:
- sh ./.drone.sh
- name: auto-release
image: xena/gitea-release:latest
pull: always
settings:
auth_username: nathan
default_branch: trunk
gitea_server: https://git.coadcorp.com
gitea_token:
from_secret: GITEA_TOKEN
when:
event:
- push
branch:
- main

0
.gitignore vendored Normal file
View File

9
CHANGELOG.md Normal file
View File

@@ -0,0 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 0.0.1
Initial development

1
VERSION Normal file
View File

@@ -0,0 +1 @@
0.0.1