Skip to content

Commit

Permalink
fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Mar 21, 2020
1 parent 2f4483b commit 8a1d0bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8a1d0bb

Please sign in to comment.