-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from Jmainguy/reusable
chore: use reusable workflow
- Loading branch information
Showing
3 changed files
with
9 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,8 @@ | ||
name: Call Reusable Golang CI Workflow | ||
|
||
on: | ||
push: | ||
push: | ||
|
||
name: push | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
test: | ||
name: Test with Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Get Build Tools | ||
run: | | ||
go install github.com/ory/go-acc@latest | ||
- name: git checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
go mod download | ||
- name: Run Unit tests | ||
run: | | ||
go-acc . | ||
- name: Send coverage | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: coverage.txt | ||
|
||
build: | ||
name: Lint and build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: install go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: git checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
|
||
- name: install lint | ||
run: GO111MODULE=off go get golang.org/x/lint/golint | ||
|
||
- name: run golint and go fmt | ||
run: ./tests/fmtlint.sh | ||
|
||
- name: go build | ||
run: go build | ||
golang-ci: | ||
uses: Jmainguy/golang-workflows/.github/workflows/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: release-please | ||
name: Call Reusable Golang Release-Please Workflow | ||
|
||
on: | ||
push: | ||
|
@@ -7,31 +7,6 @@ on: | |
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_created: ${{ steps.release-please.outputs.release_created }} | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
id: release-please | ||
with: | ||
release-type: go | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: release-please | ||
if: needs.release-please.outputs.release_created | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.21" | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
uses: Jmainguy/golang-workflows/.github/workflows/[email protected] | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.