Skip to content

Commit

Permalink
Updated release, workflows, labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Oct 29, 2021
1 parent 1ec1970 commit 7a2b17f
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 52 deletions.
17 changes: 16 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,19 @@ updates:
- "mrz1836"
# Labels must be created first
labels:
- "update"
- "update"

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
target-branch: "master"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
reviewers:
- "mrz1836"
assignees:
- "mrz1836"
labels:
- "chore"
open-pull-requests-limit: 10
16 changes: 14 additions & 2 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,23 @@
description: "Anything GUI related"
name: "ui-ux"
- color: 006b75
description: "Simple dependency updates or version bumps"
description: "Simple updates or version bumps"
name: "chore"
- color: 006b75
description: "Dependency updates"
name: "dependencies"
- color: 006b75
description: "General updates"
name: "update"
- color: FFA500
description: "Any significant refactoring"
name: "refactor"
name: "refactor"
- color: FEF2C0
description: "Used for automatic merging"
name: "automerge"
- color: FBCA04
description: "Used for denoting a WIP, stops auto-merge"
name: "work-in-progress"
- color: c2e0c6
description: "Old, stale, unused"
name: "stale"
70 changes: 35 additions & 35 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 23 * * 0'
# schedule:
# - cron: '0 23 * * 0'

jobs:
analyze:
Expand All @@ -29,43 +29,43 @@ jobs:
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Checkout repository
uses: actions/checkout@v2.3.5
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can check out the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
#- run: git checkout HEAD^2
# if: ${{ github.event_name == 'pull_request' }}
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
# - run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# From: https://goreleaser.com/ci/actions/#usage
name: release

env:
GO111MODULE: on

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.8.0
with:
distribution: goreleaser
version: latest
args: release --rm-dist --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Syndicate to GoDocs
run: make godocs
18 changes: 11 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ on:
push:
branches:
- "*"
schedule:
- cron: '1 4 * * *'
# schedule:
# - cron: '1 4 * * *'

jobs:
test:
strategy:
matrix:
go-version: [ 1.14.x, 1.15.x, 1.16.x ]
go-version: [ 1.15.x, 1.16.x, 1.17.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v2.1.4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
uses: actions/checkout@v2.3.5
- uses: actions/cache@v2.1.6
with:
path: |
~/go/pkg/mod # Module download cache
Expand All @@ -40,4 +40,8 @@ jobs:
- name: Run linter and tests
run: make test-ci
- name: Update code coverage
run: bash <(curl -s https://codecov.io/bash)
uses: codecov/codecov-action@v2.1.0
with:
flags: unittests
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
8 changes: 4 additions & 4 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Workflow: https://github.com/micnncim/action-label-syncer
# Export your labels: https://github.com/micnncim/label-exporter
name: Sync labels
name: sync-labels
on:
push:
branches:
Expand All @@ -11,9 +11,9 @@ jobs:
sync-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: micnncim/action-label-syncer@v1
- uses: actions/checkout@v2.3.5
- uses: micnncim/action-label-syncer@v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
manifest: .github/labels.yml
manifest: .github/labels.yml
57 changes: 54 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Make sure to check the documentation at http://goreleaser.com
# ---------------------------
# GENERAL
# General
# ---------------------------
before:
hooks:
Expand All @@ -12,16 +12,67 @@ changelog:
filters:
exclude:
- '^.github:'
- '^.vscode:'
- '^test:'

# ---------------------------
# BUILDER
# Publishers
# ---------------------------
# publishers:
# - name: "Publish GoDocs"
# cmd: make godocs

# ---------------------------
# Builder
# ---------------------------
build:
skip: true

# ---------------------------
# Github Release
# ---------------------------
release:
prerelease: true
name_template: "Release v{{.Version}}"
name_template: "Release v{{.Version}}"

# ---------------------------
# Announce
# ---------------------------
announce:

# See more at: https://goreleaser.com/customization/announce/#slack
slack:
enabled: false
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Changelog: https://github.com/mrz1836/{{ .ProjectName }}/releases/tag/{{ .Tag }}'
channel: '#test_slack'
# username: ''
# icon_emoji: ''
# icon_url: ''

# See more at: https://goreleaser.com/customization/announce/#twitter
twitter:
enabled: false
message_template: '{{ .ProjectName }} {{ .Tag }} is out!'

# See more at: https://goreleaser.com/customization/announce/#discord
discord:
enabled: false
message_template: '{{ .ProjectName }} {{ .Tag }} is out!'
# Defaults to `GoReleaser`
author: ''
# Defaults to `3888754` - the grey-ish from goreleaser
color: ''
# Defaults to `https://goreleaser.com/static/avatar.png`
icon_url: ''

# See more at: https://goreleaser.com/customization/announce/#reddit
reddit:
enabled: false
# Application ID for Reddit Application
application_id: ""
# Username for your Reddit account
username: ""
# Defaults to `{{ .GitURL }}/releases/tag/{{ .Tag }}`
# url_template: 'https://github.com/mrz1836/{{ .ProjectName }}/releases/tag/{{ .Tag }}'
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out!`
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'

0 comments on commit 7a2b17f

Please sign in to comment.