add release workflow
This commit is contained in:
parent
cfe6e8adff
commit
ec73e1aad5
4 changed files with 70 additions and 1 deletions
56
.github/workflows/release.yaml
vendored
Normal file
56
.github/workflows/release.yaml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: '1.14.x'
|
||||||
|
- name: Create release artifacts
|
||||||
|
run: make release
|
||||||
|
- name: Create Github Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: ${{ github.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
- name: Upload release artifacts (Mac OS amd64)
|
||||||
|
id: upload-release-asset
|
||||||
|
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_content_type: application/octet-stream
|
||||||
|
- name: Upload release artifacts (FreeBSD amd64)
|
||||||
|
id: upload-release-asset
|
||||||
|
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_content_type: application/octet-stream
|
||||||
|
- name: Upload release artifacts (Linux amd64)
|
||||||
|
id: upload-release-asset
|
||||||
|
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_content_type: application/octet-stream
|
2
Makefile
2
Makefile
|
@ -10,7 +10,7 @@ GOGET = $(GOCMD) get
|
||||||
GIT_VERSION := $(shell git --no-pager describe --tags --always)
|
GIT_VERSION := $(shell git --no-pager describe --tags --always)
|
||||||
GIT_COMMIT := $(shell git rev-parse --verify HEAD)
|
GIT_COMMIT := $(shell git rev-parse --verify HEAD)
|
||||||
|
|
||||||
GOX_ARGS = -output="$(BUILD_DIR)/{{.Dir}}-${GIT_VERSION}-{{.OS}}-{{.Arch}}" -osarch="linux/amd64 linux/arm linux/arm64 darwin/amd64 freebsd/amd64"
|
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
|
||||||
|
|
5
go.mod
5
go.mod
|
@ -1,3 +1,8 @@
|
||||||
module github.com/systemli/prometheus-jitsi-meet-exporter
|
module github.com/systemli/prometheus-jitsi-meet-exporter
|
||||||
|
|
||||||
go 1.14
|
go 1.14
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/hashicorp/go-version v1.2.0 // indirect
|
||||||
|
github.com/mitchellh/gox v1.0.1 // indirect
|
||||||
|
)
|
||||||
|
|
8
go.sum
Normal file
8
go.sum
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
github.com/hashicorp/go-version v1.0.0 h1:21MVWPKDphxa7ineQQTrCU5brh7OuVVAzGOCnnCPtE8=
|
||||||
|
github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||||
|
github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E=
|
||||||
|
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||||
|
github.com/mitchellh/gox v1.0.1 h1:x0jD3dcHk9a9xPSDN6YEL4xL6Qz0dvNYm8yZqui5chI=
|
||||||
|
github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4=
|
||||||
|
github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=
|
||||||
|
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
Loading…
Reference in a new issue