Skip to content

Commit

Permalink
Merge pull request #47 from Songmu/tagpr
Browse files Browse the repository at this point in the history
introduce tagpr
  • Loading branch information
Songmu authored Nov 20, 2022
2 parents c1b112f + 70bdb70 commit 1b884b9
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 33 deletions.
22 changes: 22 additions & 0 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: release
description: release maltmill
inputs:
tag:
description: tag name to be released
default: ''
token:
description: GitHub token
required: true
runs:
using: composite
steps:
- name: setup go
uses: actions/setup-go@v3
with:
go-version: 1.x
- name: release
run: |
make crossbuild upload
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
12 changes: 2 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,8 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- name: setup go
uses: actions/setup-go@v3
with:
go-version: 1.x
- name: checkout
uses: actions/checkout@v3
- uses: ./.github/actions/release
with:
fetch-depth: 0
- name: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make crossbuild upload
token: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/tagpr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: tagpr
on:
push:
branches:
- "main"
jobs:
tagpr:
runs-on: ubuntu-latest
steps:
- name: setup go
uses: actions/setup-go@v3
with:
go-version: 1.x
- name: checkout
uses: actions/checkout@v3
- name: tagpr
id: tagpr
uses: Songmu/tagpr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/release
with:
tag: ${{ steps.tagpr.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
if: "steps.tagpr.outputs.tag != ''"
36 changes: 15 additions & 21 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
name: test
on: [push]
on:
push:
branches:
- "**"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v3
with:
go-version: 1.x
- name: checkout
uses: actions/checkout@v3
go-version-file: go.mod
- name: test
run: |
go test -coverprofile coverage.out ./...
- name: Convert coverage to lcov
uses: jandelgado/[email protected]
with:
infile: coverage.out
outfile: coverage.lcov
if: "matrix.os == 'ubuntu-latest'"
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
if: "matrix.os == 'ubuntu-latest'"
run: go test -coverprofile coverage.out -covermode atomic ./...
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Send coverage
uses: codecov/codecov-action@v1
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ crossbuild: go.sum devel-deps

.PHONY: upload
upload:
ghr -body="$$(godzil changelog --latest -F markdown)" v$(VERSION) dist/v$(VERSION)
ghr v$(VERSION) $(DIST_DIR)
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
comment: false
github_checks: false
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Songmu/ecschedule

go 1.18
go 1.19

require (
github.com/aws/aws-sdk-go v1.44.52
Expand Down

0 comments on commit 1b884b9

Please sign in to comment.