diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 50203f11..2050b0a4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -29,7 +29,7 @@ on: jobs: build: runs-on: ubuntu-latest - env: + env: GO111MODULE: on GOLANGCI_LINT_VERSION: v1.22.0 @@ -37,10 +37,10 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.14 id: go - name: Check out code - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Cache Go modules uses: actions/cache@v1 id: cache-go-mod diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0be81d29..777ecdc8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,12 +28,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - + - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13.x - + go-version: 1.14 + - name: Get current time uses: gerred/actions/current-time@master id: current-time @@ -41,15 +41,15 @@ jobs: - name: Set version # run: echo "::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\//}" run: echo "::set-env name=RELEASE_VERSION::$(git describe --tags $(git rev-list --tags --max-count=1))" - + - name: Build ghz run: | mkdir ./dist/ mkdir ./dist/${{ matrix.target }}/ go build -ldflags='-s -w -X main.version=${{ env.RELEASE_VERSION }} -X main.commit=${{ github.sha }} -X main.date=${{ steps.current-time.outputs.time }}' -o ./dist/${{ matrix.target }}/ ./cmd/ghz/... - + - name: Build ghz-web - env: + env: CGO_ENABLED: 1 run: | go build -ldflags='-s -w -X main.version=${{ env.RELEASE_VERSION }} -X main.commit=${{ github.sha }} -X main.date=${{ steps.current-time.outputs.time }}' -o ./dist/${{ matrix.target }}/ ./cmd/ghz-web/... @@ -60,7 +60,7 @@ jobs: cp ./LICENSE ./dist/${{ matrix.target }}/LICENSE cd ./dist/${{ matrix.target }} 7z a ../../${{ matrix.name }} ghz.exe ghz-web.exe ./LICENSE - + - name: Prepare build artifacts [-nix] if: matrix.os != 'windows-latest' run: | @@ -150,9 +150,9 @@ jobs: git config --global credential.helper store git config --global user.name "bojand" git config --global user.email "dbojan@gmail.com" - cd $(brew --repo homebrew/core) + cd $(brew --repo homebrew/core) git fetch origin - sudo git reset --hard origin/master + sudo git reset --hard origin/master cd - brew bump-formula-pr --url=https://github.com/bojand/ghz/archive/${{ env.RELEASE_VERSION }}.tar.gz --message="Automated release pull request using continuous integration." --no-browse -v ghz --force brew bump-formula-pr --url=https://github.com/bojand/ghz/archive/${{ env.RELEASE_VERSION }}.tar.gz --message="Automated release pull request using continuous integration." --no-browse -v ghz-web --force diff --git a/go.mod b/go.mod index 8088bc36..6774c0bb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/bojand/ghz -go 1.13 +go 1.14 require ( cloud.google.com/go v0.46.3 // indirect