-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move to goreleaser * Apply suggestions from code review
- Loading branch information
1 parent
f8d9d00
commit c2167be
Showing
5 changed files
with
64 additions
and
116 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 |
---|---|---|
|
@@ -10,31 +10,33 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Setup go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: '1.16.x' | ||
|
||
- name: Vet | ||
run: make vet | ||
run: go vet | ||
|
||
- name: Test | ||
run: make coverage | ||
run: go test ./... | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Setup go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: '1.16.x' | ||
|
||
- name: Build | ||
run: make build | ||
run: go build ./... | ||
|
||
docker: | ||
name: Docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Docker | ||
run: make docker | ||
run: docker build . |
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 |
---|---|---|
|
@@ -10,62 +10,26 @@ jobs: | |
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- 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/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
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/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v2 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
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-freebsd | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
go-version: 1.16.x | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
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-linux | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Release | ||
uses: goreleaser/[email protected] | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: build/prometheus-jitsi-meet-exporter-linux-amd64 | ||
asset_name: prometheus-jitsi-meet-exporter-linux-amd64 | ||
asset_content_type: application/octet-stream | ||
- name: Upload release artifacts (shasums) | ||
id: upload-release-asset-sha512sums | ||
uses: actions/[email protected] | ||
version: latest | ||
args: release --rm-dist | ||
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 |
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,34 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarm: | ||
- 6 | ||
- 7 | ||
ldflags: | ||
- -s -w | ||
dockers: | ||
- | ||
goos: linux | ||
goarch: amd64 | ||
image_templates: | ||
- "systemli/prometheus-jitsi-meet-exporter:{{ .Tag }}" | ||
- "systemli/prometheus-jitsi-meet-exporter:{{ .Major }}" | ||
- "systemli/prometheus-jitsi-meet-exporter:{{ .Major }}.{{ .Minor }}" | ||
- "systemli/prometheus-jitsi-meet-exporter:latest" | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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