-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4afef89
commit d3665f9
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
paths: | ||
- "*" | ||
- "!README.md" | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: '1.16.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 | ||
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-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-jicofo-exporter-darwin-amd64 | ||
asset_name: prometheus-jicofo-exporter-darwin-amd64 | ||
asset_content_type: application/octet-stream | ||
- name: Upload release artifacts (FreeBSD amd64) | ||
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-jicofo-exporter-freebsd-amd64 | ||
asset_name: prometheus-jicofo-exporter-freebsd-amd64 | ||
asset_content_type: application/octet-stream | ||
- name: Upload release artifacts (Linux amd64) | ||
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-jicofo-exporter-linux-amd64 | ||
asset_name: prometheus-jicofo-exporter-linux-amd64 | ||
asset_content_type: application/octet-stream | ||
- name: Upload release artifacts (shasums) | ||
id: upload-release-asset-sha512sums | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: build/sha512sums.txt | ||
asset_name: sha512sums.txt | ||
asset_content_type: application/octet-stream |