Skip to content

Commit

Permalink
Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
SlashNephy committed Jan 31, 2023
1 parent 94ab030 commit ecf248d
Show file tree
Hide file tree
Showing 11 changed files with 714 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[*.go]
indent_style = tab
28 changes: 28 additions & 0 deletions .github/workflows/check-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Check'

on:
push:
branches:
- 'master'

pull_request:
types:
- opened
- synchronize

workflow_dispatch:

jobs:
build:
if: github.event_name != 'push'
uses: SlashNephy/.github/.github/workflows/go-run.yml@master
permissions:
contents: 'read'
with:
task: 'build'

lint:
uses: SlashNephy/.github/.github/workflows/go-lint.yml@master
permissions:
contents: 'read'
pull-requests: 'write'
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
cache-dependency-path: 'go.sum'

- name: Release
uses: goreleaser/goreleaser-action@v3
with:
args: release --rm-dist
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@

# Dependency directories (remove the comment below to include it)
# vendor/

mackerel-plugin-epgstation
16 changes: 16 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
builds:
- binary: mackerel-plugin-epgstation
goos:
- linux
goarch:
- amd64
- arm64

archives:
- format: zip
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"

release:
github:
owner: SlashNephy
name: mackerel-plugin-epgstation
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build:
go build -o mackerel-plugin-epgstation ./*.go

run:
go run ./*.go
Loading

0 comments on commit ecf248d

Please # to comment.