summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yaml32
-rw-r--r--.gitignore1
-rw-r--r--.goreleaser.yaml32
3 files changed, 65 insertions, 0 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
new file mode 100644
index 0000000..3b95fba
--- /dev/null
+++ b/.github/workflows/release.yaml
@@ -0,0 +1,32 @@
+name: Release
+
+on:
+ push:
+ tags:
+ - "*"
+
+permissions:
+ contents: write
+
+jobs:
+ release:
+ name: Release
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - run: git fetch --force --tags
+
+ - uses: actions/setup-go@v4
+ with:
+ go-version: "1.21.3"
+
+ - uses: goreleaser/goreleaser-action@v5
+ with:
+ distribution: goreleaser
+ version: latest
+ args: release --clean
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 9daa824..fd10abd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
.DS_Store
node_modules
+dist/
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
new file mode 100644
index 0000000..6556f68
--- /dev/null
+++ b/.goreleaser.yaml
@@ -0,0 +1,32 @@
+before:
+ hooks:
+ - go mod tidy
+
+builds:
+ - main: ./cmd/flyscrape
+ env:
+ - CGO_ENABLED=0
+ goos:
+ - linux
+ - windows
+ - darwin
+ goarch:
+ - amd64
+ - arm64
+
+archives:
+ - format: tar.gz
+ name_template: >-
+ {{ .ProjectName }}_
+ {{- if eq .Os "darwin" }}mac{{else}}{{ .Os }}{{ end }}_
+ {{- .Arch }}
+ format_overrides:
+ - goos: windows
+ format: zip
+
+changelog:
+ sort: asc
+ filters:
+ exclude:
+ - "^docs:"
+ - "^test:"