Skip to content

Commit 6957fb6

Browse files
authored
Merge pull request #7 from planetlabs/release
Release workflow
2 parents 54d1c21 + b64bd0d commit 6957fb6

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
- run: git fetch --force --tags
19+
- uses: actions/[email protected]
20+
with:
21+
go-version: '1.20'
22+
- uses: goreleaser/goreleaser-action@v4
23+
with:
24+
distribution: goreleaser
25+
version: latest
26+
args: release --clean
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
builds:
5+
- main: ./cmd/xyz2ogc/
6+
binary: xyz2ogc
7+
env:
8+
- CGO_ENABLED=0
9+
goos:
10+
- linux
11+
- windows
12+
- darwin
13+
archives:
14+
- name_template: >-
15+
{{ .ProjectName }}_
16+
{{- title .Os }}_
17+
{{- if eq .Arch "amd64" }}x86_64
18+
{{- else if eq .Arch "386" }}i386
19+
{{- else }}{{ .Arch }}{{ end }}
20+
checksum:
21+
name_template: 'checksums.txt'
22+
snapshot:
23+
name_template: "{{ incpatch .Version }}-next"
24+
changelog:
25+
sort: asc
26+
use: github-native
27+
brews:
28+
- tap:
29+
owner: planetlabs
30+
name: homebrew-tap
31+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
32+
url_template: "https://github.com/planetlabs/{{ .ProjectName }}/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
33+
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
34+
homepage: "https://github.com/planetlabs/go-ogc"
35+
description: "Generate OGC API - Tiles metadata from exiting XYZ tilesets."
36+
license: "Apache-2.0"
37+
test: |
38+
system "#{bin}/xyz2ogc version"

readme.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ The `filter` package provides structs for encoding and decoding CQL2 filters as
2727

2828
The `xyz2ogc` command line utility can be used to generate [OGC API – Tiles](https://ogcapi.ogc.org/tiles/) metadata from exiting XYZ tilesets.
2929

30+
### Installation
31+
32+
The `xyz2ogc` program can be installed by downloading one of the archives from [the latest release](https://github.com/planetlabs/go-ogc/releases).
33+
34+
Extract the archive and place the `xyz2ogc` executable somewhere on your path. See a list of available commands by running `xyz2ogc` in your terminal.
35+
36+
Homebrew users can install the `xyz2ogc` program with [`brew`](https://brew.sh/):
37+
38+
brew install planetlabs/tap/go-ogc
39+
3040
### Use
3141

3242
The `xyz2ogc` program reads a configuration file (`config.toml` by default) for information about a list of XYZ tilesets. The program will then generate OGC API – Tiles compliant metadata for the configured tilesets.

0 commit comments

Comments
 (0)