You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
liuzhiguo 71469334e4 | 6 months ago | |
---|---|---|
drone | 2 years ago | |
plugin | 6 months ago | |
.drone.yml | 4 years ago | |
.github_changelog_generator | 3 years ago | |
.golangci.yml | 3 years ago | |
CHANGELOG.md | 6 months ago | |
LICENSE | 9 years ago | |
NOTICE | 5 years ago | |
README.md | 6 months ago | |
go.mod | 6 months ago | |
go.sum | 4 years ago |
README.md
drone-go
package main
import (
"fmt"
"git.awesome-for.me/liuzhiguo/drone-go/drone"
"golang.org/x/oauth2"
)
const (
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
host = "http://drone.company.com"
)
func main() {
// create an http client with oauth authentication.
config := new(oauth2.Config)
auther := config.Client(
oauth2.NoContext,
&oauth2.Token{
AccessToken: token,
},
)
// create the drone client with authenticator
client := drone.NewClient(host, auther)
// gets the current user
user, err := client.Self()
fmt.Println(user, err)
// gets the named repository information
repo, err := client.Repo("drone", "drone-go")
fmt.Println(repo, err)
}
Release procedure
Run the changelog generator.
docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone -p drone-go -t <secret github token>
You can generate a token by logging into your GitHub account and going to Settings -> Personal access tokens.
Next we tag the PR's with the fixes or enhancements labels. If the PR does not fufil the requirements, do not add a label.
Run the changelog generator again with the future version according to semver.
docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone -p drone-go -t <secret token> --future-release v1.0.0
Create your pull request for the release. Get it merged then tag the release.