Skip to content

Commit

Permalink
👷 Improve Release Process
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Feb 25, 2022
1 parent a637bed commit 61119fe
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 31 deletions.
17 changes: 14 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,23 @@ updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
day: "friday"
time: "09:00"
timezone: "Europe/Berlin"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
day: "friday"
time: "09:00"
timezone: "Europe/Berlin"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
day: "friday"
time: "09:00"
timezone: "Europe/Berlin"
23 changes: 23 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧹 Maintenance'
labels:
- 'chore'
- 'dependencies'
template: |
## Changes
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION
## Docker
- `docker pull systemli/prometheus-etherpad-exporter:$RESOLVED_VERSION`
19 changes: 12 additions & 7 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@ name: Integration

on:
push:
pull_request:
branches:
- main
pull_request_target:

jobs:
test:
name: Test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.4.0
- name: Checkout
uses: actions/checkout@v2.4.0

- name: Setup go
uses: actions/setup-go@v2.2.0
with:
go-version: '1.16.x'
go-version: '1.17.x'

- name: Vet
run: go vet
Expand All @@ -24,19 +27,21 @@ jobs:

build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs:
- test
steps:
- uses: actions/checkout@v2.4.0
- name: Checkout
uses: actions/checkout@v2.4.0

- name: Setup go
uses: actions/setup-go@v2.2.0
with:
go-version: '1.16.x'
go-version: '1.17.x'

- name: Build
run: go build ./...

- name: Docker
run: docker build .

12 changes: 7 additions & 5 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ name: Quality

on:
push:
pull_request:
branches:
- main
pull_request_target:

jobs:
golangci:
name: GolangCI
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.4.0
- name: Checkout
uses: actions/checkout@v2.4.0

- name: GolangCI
uses: golangci/golangci-lint-action@v3
with:
version: v1.31
17 changes: 12 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,32 @@ on:
jobs:
release:
name: Release
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v2.2.0
with:
go-version: 1.16.x
go-version: '1.17.x'

- name: Login to Docker Hub
uses: docker/login-action@v1.13.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Release
- name: Publish Changelog
uses: release-drafter/release-drafter@v5.18.1
with:
publish: true
name: ${{ github.ref_name }}
tag: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build Releases
uses: goreleaser/goreleaser-action@v2.8.1
with:
version: latest
Expand Down
10 changes: 3 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ builds:
- windows
- darwin
goarm:
- 6
- 7
- "6"
- "7"
ldflags:
- -s -w
dockers:
Expand All @@ -27,8 +27,4 @@ checksum:
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
skip: true
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @0x46616c6b
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Prometheus Exporter for Etherpad written in Go.
## Usage

```
go get github.com/systemli/prometheus-etherpad-exporter
go install github.com/systemli/prometheus-etherpad-exporter
go install github.com/systemli/prometheus-etherpad-exporter@latest
$GOPATH/bin/prometheus-etherpad-exporter
```

Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module github.com/systemli/prometheus-etherpad-exporter

go 1.16
go 1.17

require (
github.com/google/go-cmp v0.5.7
github.com/sirupsen/logrus v1.8.1
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 // indirect
)

require golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 // indirect

0 comments on commit 61119fe

Please sign in to comment.