Skip to content

Commit ef742b2

Browse files
committed
add goreleaser and release workflow
1 parent d4c3768 commit ef742b2

File tree

4 files changed

+84
-1
lines changed

4 files changed

+84
-1
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: 1.15
21+
22+
- name: Import PGP key
23+
run: echo -e "${{ secrets.PGP_SIGNING_KEY }}" | gpg --import
24+
25+
- name: Release
26+
uses: goreleaser/goreleaser-action@v2
27+
with:
28+
version: latest
29+
args: release --rm-dist
30+
env:
31+
PGP_USER_ID: ${{ secrets.PGP_USER_ID }}
32+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

.goreleaser.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
env:
2+
- GO111MODULE=on
3+
- CGO_ENABLED=0
4+
5+
before:
6+
hooks:
7+
- go test ./...
8+
- python scripts/generateDefaultConfig.py
9+
10+
builds:
11+
- mod_timestamp: '{{ .CommitTimestamp }}'
12+
flags:
13+
- -trimpath
14+
ldflags:
15+
- '-s -w -X "main.version={{ .RawVersion }}" -X "main.prerelease={{ if .IsSnapshot }}snapshot.{{ .ShortCommit }}{{ else }}{{ .Prerelease }}{{ end }}"'
16+
targets:
17+
- linux_386
18+
- linux_amd64
19+
- linux_arm
20+
- windows_386
21+
- windows_amd64
22+
- darwin_amd64
23+
- freebsd_386
24+
- freebsd_amd64
25+
- freebsd_arm
26+
- openbsd_386
27+
- openbsd_amd64
28+
29+
archives:
30+
- format: binary
31+
name_template: 'tsc-ls_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
32+
33+
checksum:
34+
name_template: 'tsc-ls_{{ .Version }}_SHA256SUM'
35+
algorithm: sha256
36+
37+
signs:
38+
- args: [ '-u', '{{ .Env.PGP_USER_ID }}', '--output', '${signature}', '--detach-sign', '${artifact}' ]
39+
artifacts: checksum
40+
41+
changelog:
42+
skip: true

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## v0.1.0 - 2020-11-21
8+
9+
Initial working version.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package uri
22

3-
func normalizeUri(path string) string {
3+
func normalizePath(path string) string {
44
return "/" + path
55
}

0 commit comments

Comments
 (0)