-
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.
- Loading branch information
Showing
10 changed files
with
148 additions
and
63 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This script is provided by github.com/bool64/dev. | ||
name: cloc | ||
on: | ||
pull_request: | ||
jobs: | ||
cloc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: pr | ||
- name: Checkout base code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.base.sha }} | ||
path: base | ||
- name: Count Lines Of Code | ||
id: loc | ||
run: | | ||
curl -OL https://github.com/vearutop/builds/releases/download/sccdiff-v0/sccdiff && chmod +x sccdiff | ||
OUTPUT=$(cd pr && ../sccdiff -basedir ../base) | ||
OUTPUT="${OUTPUT//'%'/'%25'}" | ||
OUTPUT="${OUTPUT//$'\n'/'%0A'}" | ||
OUTPUT="${OUTPUT//$'\r'/'%0D'}" | ||
echo "::set-output name=diff::$OUTPUT" | ||
- name: Comment Code Lines | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
header: LOC | ||
message: | | ||
### Lines Of Code | ||
${{ steps.loc.outputs.diff }} |
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,3 +1,4 @@ | ||
# This script is provided by github.com/bool64/dev. | ||
name: lint | ||
on: | ||
push: | ||
|
@@ -14,10 +15,10 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/[email protected].1 | ||
uses: golangci/[email protected].2 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.38.0 | ||
version: v1.39.0 | ||
|
||
# Optional: working directory, useful for monorepos | ||
# working-directory: somedir | ||
|
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,77 @@ | ||
# This script is provided by github.com/bool64/dev. | ||
|
||
# This script uploads application binaries as GitHub release assets. | ||
name: release-assets | ||
on: | ||
release: | ||
types: | ||
- created | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
build: | ||
name: Upload Release Assets | ||
strategy: | ||
matrix: | ||
go-version: [ 1.16.x ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Build artifacts | ||
run: | | ||
make release-assets | ||
- name: Upload linux_amd64.tar.gz | ||
if: hashFiles('linux_amd64.tar.gz') != '' | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./linux_amd64.tar.gz | ||
asset_name: linux_amd64.tar.gz | ||
asset_content_type: application/tar+gzip | ||
- name: Upload linux_arm64.tar.gz | ||
if: hashFiles('linux_arm64.tar.gz') != '' | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./linux_arm64.tar.gz | ||
asset_name: linux_arm64.tar.gz | ||
asset_content_type: application/tar+gzip | ||
- name: Upload linux_arm.tar.gz | ||
if: hashFiles('linux_arm.tar.gz') != '' | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./linux_arm.tar.gz | ||
asset_name: linux_arm.tar.gz | ||
asset_content_type: application/tar+gzip | ||
- name: Upload darwin_amd64.tar.gz | ||
if: hashFiles('darwin_amd64.tar.gz') != '' | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./darwin_amd64.tar.gz | ||
asset_name: darwin_amd64.tar.gz | ||
asset_content_type: application/tar+gzip | ||
- name: Upload darwin_arm64.tar.gz | ||
if: hashFiles('darwin_arm64.tar.gz') != '' | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./darwin_arm64.tar.gz | ||
asset_name: darwin_arm64.tar.gz | ||
asset_content_type: application/tar+gzip | ||
- name: Upload windows_amd64.zip | ||
if: hashFiles('windows_amd64.zip') != '' | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./windows_amd64.zip | ||
asset_name: windows_amd64.zip | ||
asset_content_type: application/zip | ||
|
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,2 +1,5 @@ | ||
/.idea | ||
/build | ||
/*.coverprofile | ||
/.vscode | ||
/bench-*.txt | ||
/vendor |
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
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
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 was deleted.
Oops, something went wrong.