From 8a1d0bb4e235a3d75828a1398194c217fae68c58 Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 21 Mar 2020 21:19:32 +0100 Subject: [PATCH] fix release workflow --- .github/workflows/release.yaml | 17 +++++++++++------ Makefile | 5 +---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e042f01..2727991 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,6 +17,8 @@ jobs: go-version: '1.14.x' - name: Create release artifacts run: make release + env: + GOPATH: ${{ github.workspace }}/go - name: Create Github Release id: create_release uses: actions/create-release@v1 @@ -28,29 +30,32 @@ jobs: draft: false prerelease: false - name: Upload release artifacts (Mac OS amd64) - id: upload-release-asset + id: upload-release-asset-mac uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: build/prometheus-jitsi-meet-exporter-${{ github.ref }}-darwin-amd64 + asset_path: build/prometheus-jitsi-meet-exporter-darwin-amd64 + asset_name: prometheus-jitsi-meet-exporter-darwin-amd64 asset_content_type: application/octet-stream - name: Upload release artifacts (FreeBSD amd64) - id: upload-release-asset + id: upload-release-asset-freebsd uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: build/prometheus-jitsi-meet-exporter-${{ github.ref }}-freebsd-amd64 + asset_path: build/prometheus-jitsi-meet-exporter-freebsd-amd64 + asset_name: prometheus-jitsi-meet-exporter-freebsd-amd64 asset_content_type: application/octet-stream - name: Upload release artifacts (Linux amd64) - id: upload-release-asset + id: upload-release-asset-linux uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: build/prometheus-jitsi-meet-exporter-${{ github.ref }}-freebsd-amd64 + asset_path: build/prometheus-jitsi-meet-exporter-linux-amd64 + asset_name: prometheus-jitsi-meet-exporter-linux-amd64 asset_content_type: application/octet-stream diff --git a/Makefile b/Makefile index 373a7b8..180b12d 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,7 @@ GOGET = $(GOCMD) get GOX = $(GOPATH)/bin/gox GOGET = $(GOCMD) get -GIT_VERSION := $(shell git --no-pager describe --tags --always) -GIT_COMMIT := $(shell git rev-parse --verify HEAD) - -GOX_ARGS = -output="$(BUILD_DIR)/{{.Dir}}-${GIT_VERSION}-{{.OS}}-{{.Arch}}" -osarch="linux/amd64 darwin/amd64 freebsd/amd64" +GOX_ARGS = -output="$(BUILD_DIR)/{{.Dir}}-{{.OS}}-{{.Arch}}" -osarch="linux/amd64 darwin/amd64 freebsd/amd64" BUILD_DIR = build BINARY_NAME = prometheus-jitsi-meet-exporter