From 2d55d4f1e6ffa8417f47b486ea0a6dda74bec65c Mon Sep 17 00:00:00 2001 From: Timur Demin Date: Fri, 20 Nov 2020 16:19:01 +0500 Subject: [PATCH] Add CI config and pkg.go.dev link --- .drone.yml | 27 ++++++++++++++++++++++++++ .goreleaser.yml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 3 files changed, 80 insertions(+) create mode 100644 .drone.yml create mode 100644 .goreleaser.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..a7ce8d7 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,27 @@ +kind: pipeline +name: build & release + +steps: +- name: fetch tags + image: docker:git + commands: + - git fetch --tags + when: + event: tag +- name: test + image: golang:1.14 + commands: + - go test -v ./internal/gemini + when: + event: + exclude: + - tag +- name: release + image: golang:1.15 + environment: + GITEA_TOKEN: + from_secret: goreleaser_gitea_token + commands: + - curl -sL https://git.io/goreleaser | bash + when: + event: tag diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..3060979 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,51 @@ +builds: +- main: ./cmd/gmnhg + id: gmnhg + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + - freebsd + - openbsd + - netbsd +- main: ./cmd/md2gmn + id: md2gmn + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + - freebsd + - openbsd + - netbsd +archives: +- replacements: + darwin: Darwin + linux: Linux + windows: Windows + freebsd: FreeBSD + openbsd: OpenBSD + netbsd: NetBSD + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + +release: + gitea: + owner: tdemin + name: gmnhg + +gitea_urls: + api: https://git.tdem.in/api/v1/ diff --git a/README.md b/README.md index 44cc4be..cba9b90 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Hugo-to-Gemini converter +[![PkgGoDev](https://pkg.go.dev/badge/git.tdem.in/tdemin/gmnhg)](https://pkg.go.dev/git.tdem.in/tdemin/gmnhg) + This repo holds a converter of Hugo Markdown posts to [text/gemini][Gemtext] (also named Gemtext in this README). The converter is supposed to make people using [Hugo](https://gohugo.io)'s