Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed tested and working release #179

Merged
merged 4 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,6 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: "--debug"
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Download release notes utility
env:
GH_REL_URL: https://github.com/buchanae/github-release-notes/releases/download/0.2.0/github-release-notes-linux-amd64-0.2.0.tar.gz
Expand All @@ -46,10 +26,18 @@ jobs:
github-release-notes -org weaveworks -repo weave-gitops -include-author >> /tmp/release.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set env var
run: |
make dependencies
echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
echo "FLUX_VERSION=$($(pwd)/tools/bin/stoml $(pwd)/tools/dependencies.toml flux.version)" >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --release-notes=/tmp/release.txt --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: ${{ env.BRANCH }}
FLUX_VERSION: ${{ env.FLUX_VERSION }}

16 changes: 8 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
project_name: wego
env:
- GO111MODULE=on
before:
hooks:
- go mod tidy
builds:
- <<: &build_defaults
binary: wego
main: ./cmd/wego
ldflags:
- -X github.com/weaveworks/weave-gitops/cmd/wego/version.BuildTime={{.Date}}
- -X github.com/weaveworks/weave-gitops/cmd/wego/version.Branch=$(BRANCH)
- -X github.com/weaveworks/weave-gitops/cmd/wego/version.Branch={{ .Env.BRANCH}}
- -X github.com/weaveworks/weave-gitops/cmd/wego/version.GitCommit={{.Commit}}
- -X github.com/weaveworks/weave-gitops/pkg/version.FluxVersion=$(FLUX_VERSION)
- -X github.com/weaveworks/weave-gitops/pkg/version.FluxVersion={{ .Env.FLUX_VERSION }}
env:
- CGO_ENABLED=0
hooks:
pre: export CURRENT_DIR=pwd
pre: $(CURRENT_DIR)/tools/download-deps.sh $(CURRENT_DIR)/tools/dependencies.toml
pre: export BRANCH=git rev-parse --abbrev-ref HEAD
pre: export FLUX_VERSION=$(CURRENT_DIR)/tools/bin/stoml $(CURRENT_DIR)/tools/dependencies.toml flux.version
id: linux
goos:
- linux
Expand All @@ -30,4 +30,4 @@ builds:
- darwin
goarch:
- amd64
- arm64
- arm64