Skip to content

Commit

Permalink
Big update
Browse files Browse the repository at this point in the history
  • Loading branch information
adampresley committed Jun 3, 2021
1 parent ff16407 commit 140f18f
Show file tree
Hide file tree
Showing 7 changed files with 895 additions and 63 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: ANWAG

on:
push:
tags:
- "v*.*.*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Build
env:
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
run: |
git config --global url."https://${ACTIONS_TOKEN}@github.com/".insteadOf "https://github.com/"
make build-all
- name: Package
run: make package

- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
body_path: ./CHANGELOG.md
files: "*.zip"

15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Changelog

All notable changes will be docmented here.

## 1.1.0

* Add ability to generate Go model files from database tables
* Added auto-build and release publishing through Github Actions

## 1.0.0

* First release
* Supports scaffolding a VueJS + Go application
* Supports connecting to a Postgres database

16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

VERSION=1.0.0
VERSION := $(shell cat ./VERSION)
BUILDFLAGS=-s -w -X 'main.Version=${VERSION}'
PROJECTNAME=anwag
GOENV=CGO_ENABLED=0 GOPRIVATE="github.com/app-nerds/*" GONOPROXY="github.com/app-nerds/*"
GC=${GOENV} go build -ldflags="${BUILDFLAGS}" -o ${PROJECTNAME}
GC=${GOENV} go build -ldflags="${BUILDFLAGS}" -mod=mod -o ${PROJECTNAME}

ifeq ($(OS),Windows_NT)
GOOS=windows
Expand Down Expand Up @@ -60,3 +60,15 @@ build-linux: ## Create a compiled Linux binary (amd64)

build: ## Automatically determine OS and Architecture, and build an executable
GOOS=${GOOS} GOARCH=${GOARCH} ${GC}

build-all: ## Build Windows, Linux, Mac
GOOS=windows GOARCH=amd64 ${GC}-windows-${VERSION}.exe
GOOS=darwin GOARCH=arm64 ${GC}-darwin-${VERSION}
GOOS=darwin GOARCH=amd64 ${GC}-darwin-amd64-${VERSION}
GOOS=linux GOARCH=amd64 ${GC}-linux-${VERSION}

package: ## Package executables into a ZIP file
zip ./${PROJECTNAME}-linux-amd64-${VERSION}.zip ./*linux*
zip ./${PROJECTNAME}-windows-amd64-${VERSION}.zip ./*windows*
zip ./${PROJECTNAME}-darwin-${VERSION}.zip ./*darwin*

1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.0
11 changes: 7 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ module github.com/app-nerds/anwag
go 1.16

require (
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
github.com/manifoldco/promptui v0.8.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/stretchr/objx v0.1.1 // indirect
github.com/AlecAivazis/survey/v2 v2.2.12
github.com/app-nerds/postgresr v0.0.0-20210506150046-dfa87a084b97
github.com/iancoleman/strcase v0.1.3
github.com/jackc/pgx/v4 v4.11.0
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0 // indirect
)
492 changes: 478 additions & 14 deletions go.sum

Large diffs are not rendered by default.

Loading

0 comments on commit 140f18f

Please sign in to comment.