diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..94fcbbe --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,55 @@ +name: build + +on: + push: + branches: [ main ] + tags: [ v* ] + pull_request: {} + +permissions: + contents: write + pull-requests: write + +jobs: + build: + 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: stable + + - name: Cache Go modules + uses: actions/cache@v3 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Run Setup + run: make setup + + - name: Run Tests + run: make test + + - name: Run Linter + uses: golangci/golangci-lint-action@v3 + with: + skip-go-installation: true + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 + if: startsWith(github.ref, 'refs/tags/') + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..a8bc0b9 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,59 @@ +env: + - GO111MODULE=on +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + goarch: + - 386 + - amd64 + - arm + - arm64 + ignore: + - goos: windows + goarch: arm64 + - goos: windows + goarch: arm + ldflags: + - -s -w -X main.version={{.Version}} +archives: + - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 + format_overrides: + - goos: windows + format: zip + files: + - README.md + - LICENSE +checksum: + name_template: '{{ .ProjectName }}_checksums.txt' +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + - Merge pull request + - Merge branch + - go mod tidy +nfpms: + - file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + homepage: https://github.com/hupe1980/genie + maintainer: Frank Hübner + description: Genie is a Proof of Concept (POC) source code generator that showcases the potential of utilizing Large Language Models (LLMs) for code generation + license: MIT + formats: + - apk + - deb + - rpm \ No newline at end of file