-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: break apart gh workflow Co-authored-by: Adriel Perkins <[email protected]> * ci: rename PR workflows Co-authored-by: Adriel Perkins <[email protected]> --------- Co-authored-by: Adriel Perkins <[email protected]>
- Loading branch information
Showing
4 changed files
with
97 additions
and
87 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,92 +1,64 @@ | ||
name: Lint, Build, Test and Release | ||
--- | ||
name: Build and Test | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
strategy: | ||
matrix: | ||
go: ['1.19'] | ||
os: [ubuntu-latest, macos-latest] | ||
matrix: | ||
go: ['1.19'] | ||
os: [ubuntu-latest, macos-latest] | ||
name: lint | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache: false | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache: false | ||
|
||
- name: Make install-tools | ||
run: make install-tools | ||
- name: Make install-tools | ||
run: make install-tools | ||
|
||
- name: Make lint-all | ||
run: make lint-all | ||
- name: Make lint-all | ||
run: make lint-all | ||
|
||
build: | ||
strategy: | ||
matrix: | ||
go: ['1.19'] | ||
os: [ubuntu-latest, macos-latest] | ||
name: build | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
strategy: | ||
matrix: | ||
go: ['1.19'] | ||
os: [ubuntu-latest, macos-latest] | ||
name: build | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.19' | ||
cache: false | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.19' | ||
cache: false | ||
|
||
- name: Make cibuild | ||
run: make cibuild | ||
- name: Make cibuild | ||
run: make cibuild | ||
|
||
go-semantic-release: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
needs: [lint, build] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Run go-semantic-release | ||
uses: go-semantic-release/action@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
changelog-generator-opt: "emojis=true" | ||
|
||
goreleaser: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
needs: [go-semantic-release] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch all tags | ||
run: git fetch --force --tags | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
needs: [lint, build] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Run go-semantic-release | ||
uses: go-semantic-release/action@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
changelog-generator-opt: emojis=true |
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
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,13 +1,14 @@ | ||
name: PRs labeler | ||
--- | ||
name: PR Labeler | ||
|
||
on: | ||
- pull_request_target | ||
- pull_request_target | ||
|
||
jobs: | ||
triage: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/labeler@v4 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
sync-labels: true | ||
triage: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/labeler@v4 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
sync-labels: true |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch all tags | ||
run: git fetch --force --tags | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |