fix release workflow
This commit is contained in:
parent
2f4483b5df
commit
8a1d0bb4e2
2 changed files with 12 additions and 10 deletions
17
.github/workflows/release.yaml
vendored
17
.github/workflows/release.yaml
vendored
|
@ -17,6 +17,8 @@ jobs:
|
||||||
go-version: '1.14.x'
|
go-version: '1.14.x'
|
||||||
- name: Create release artifacts
|
- name: Create release artifacts
|
||||||
run: make release
|
run: make release
|
||||||
|
env:
|
||||||
|
GOPATH: ${{ github.workspace }}/go
|
||||||
- name: Create Github Release
|
- name: Create Github Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
|
@ -28,29 +30,32 @@ jobs:
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
- name: Upload release artifacts (Mac OS amd64)
|
- name: Upload release artifacts (Mac OS amd64)
|
||||||
id: upload-release-asset
|
id: upload-release-asset-mac
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
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
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload release artifacts (FreeBSD amd64)
|
- name: Upload release artifacts (FreeBSD amd64)
|
||||||
id: upload-release-asset
|
id: upload-release-asset-freebsd
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
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
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload release artifacts (Linux amd64)
|
- name: Upload release artifacts (Linux amd64)
|
||||||
id: upload-release-asset
|
id: upload-release-asset-linux
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
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
|
asset_content_type: application/octet-stream
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -7,10 +7,7 @@ GOGET = $(GOCMD) get
|
||||||
GOX = $(GOPATH)/bin/gox
|
GOX = $(GOPATH)/bin/gox
|
||||||
GOGET = $(GOCMD) get
|
GOGET = $(GOCMD) get
|
||||||
|
|
||||||
GIT_VERSION := $(shell git --no-pager describe --tags --always)
|
GOX_ARGS = -output="$(BUILD_DIR)/{{.Dir}}-{{.OS}}-{{.Arch}}" -osarch="linux/amd64 darwin/amd64 freebsd/amd64"
|
||||||
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"
|
|
||||||
|
|
||||||
BUILD_DIR = build
|
BUILD_DIR = build
|
||||||
BINARY_NAME = prometheus-jitsi-meet-exporter
|
BINARY_NAME = prometheus-jitsi-meet-exporter
|
||||||
|
|
Loading…
Reference in a new issue