From 61119fe191de261159943a09fa3e746b877a6270 Mon Sep 17 00:00:00 2001 From: Falk Scheerschmidt Date: Fri, 25 Feb 2022 14:58:44 +0100 Subject: [PATCH] :construction_worker: Improve Release Process --- .github/dependabot.yml | 17 ++++++++++++++--- .github/release-drafter.yml | 23 +++++++++++++++++++++++ .github/workflows/integration.yaml | 19 ++++++++++++------- .github/workflows/quality.yaml | 12 +++++++----- .github/workflows/release.yaml | 17 ++++++++++++----- .goreleaser.yml | 10 +++------- CODEOWNERS | 1 + README.md | 3 +-- go.mod | 5 +++-- 9 files changed, 76 insertions(+), 31 deletions(-) create mode 100644 .github/release-drafter.yml create mode 100644 CODEOWNERS diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e881429..b3c4685 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..ec4758f --- /dev/null +++ b/.github/release-drafter.yml @@ -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` diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 746acff..3f18ec5 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -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 @@ -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 . + diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index fa555f3..c9ceec5 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 411aa82..ae59414 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,17 +8,15 @@ 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 @@ -26,7 +24,16 @@ jobs: 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 diff --git a/.goreleaser.yml b/.goreleaser.yml index faf5405..54fd53c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -9,8 +9,8 @@ builds: - windows - darwin goarm: - - 6 - - 7 + - "6" + - "7" ldflags: - -s -w dockers: @@ -27,8 +27,4 @@ checksum: snapshot: name_template: "{{ .Tag }}-next" changelog: - sort: asc - filters: - exclude: - - '^docs:' - - '^test:' + skip: true diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..291d7f7 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @0x46616c6b diff --git a/README.md b/README.md index 768e434..74df1d9 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/go.mod b/go.mod index 863dfaf..e02b951 100644 --- a/go.mod +++ b/go.mod @@ -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