Skip to content

Commit

Permalink
Add Goreleaser #220
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardottt committed Apr 17, 2024
1 parent 7405e63 commit 8f91f37
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
exclude:
authors:
- dependabot
categories:
- title: 🎉 New Features
labels:
- "Type: Enhancement"
- title: 🐞 Bug Fixes
labels:
- "Type: Bug"
- title: 🔨 Maintenance
labels:
- "Type: Maintenance"
- title: Other Changes
labels:
- "*"
30 changes: 30 additions & 0 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 🎉 Release Binary

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: "Check out code"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "Set up Go"
uses: actions/setup-go@v4
with:
go-version: 1.21.x

- name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean"
version: latest
workdir: .
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
28 changes: 28 additions & 0 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 🔨 Release Test

on:
pull_request:
paths:
- '**.go'
- '**.mod'
workflow_dispatch:

jobs:
release-test:
runs-on: ubuntu-latest
steps:
- name: "Check out code"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x

- name: release test
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean --snapshot"
version: latest
41 changes: 41 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
release:
header: |
## csprecon {{ .Tag }} 🥳
*Discover new target domains using Content Security Policy*
footer: |
If you encounter a problem, just open an [issue](https://github.com/edoardottt/csprecon/issues)
before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- 386
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
- goos: windows
goarch: 'arm'
- goos: windows
goarch: 'arm64'
binary: '{{ .ProjectName }}'
main: ./cmd/csprecon/

archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}'

checksum:
algorithm: sha256

0 comments on commit 8f91f37

Please sign in to comment.