Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: prepare for release v0.0.3 #84

Merged
merged 8 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/generate_change_log.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
change_log_file="./CHANGELOG.md"
version="## $@"
version_prefix="## v"
start=0
CHANGE_LOG=""
while read line; do
if [[ $line == *"$version"* ]]; then
start=1
continue
fi
if [[ $line == *"$version_prefix"* ]] && [ $start == 1 ]; then
break;
fi
if [ $start == 1 ]; then
CHANGE_LOG+="$line\n"
fi
done < ${change_log_file}

OUTPUT=$(cat <<-END
${CHANGE_LOG}
END
)

echo -e ${OUTPUT}
58 changes: 0 additions & 58 deletions .github/workflows/docker.yml

This file was deleted.

28 changes: 26 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,34 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.18
- uses: actions/checkout@v3

- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com".insteadOf "https://github.com"

- uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: |
go mod tidy
go mod download
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.49.0
version: v1.50.0
skip-pkg-cache: true
args: --timeout=99m
37 changes: 25 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,29 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
uses: goreleaser/goreleaser-action@v3
with:
args: release --rm-dist --release-notes ./RELEASE_NOTES.md
- name: Set Env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Checkout Code
uses: actions/checkout@v3

- name: Generate Change Log
id: changelog
run: |
chmod 755 ./.github/generate_change_log.sh
CHANGELOG=$(./.github/generate_change_log.sh ${{ env.RELEASE_VERSION }})
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.RELEASE_VERSION}}
release_name: ${{ env.RELEASE_VERSION}}
body: |
${{ env.CHANGELOG }}
draft: false
prerelease: false
8 changes: 8 additions & 0 deletions .github/workflows/test-race.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.18

- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com".insteadOf "https://github.com"

- uses: technote-space/[email protected]
id: git_diff
with:
Expand Down Expand Up @@ -99,6 +103,10 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.18

- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com".insteadOf "https://github.com"

- uses: technote-space/[email protected]
with:
PATTERNS: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ permissions:
env:
CGO_CFLAGS: "-O -D__BLST_PORTABLE__"
CGO_CFLAGS_ALLOW: "-O -D__BLST_PORTABLE__"
GH_TOKEN: "${{ secrets.GH_TOKEN }}"

jobs:
cleanup-runs:
Expand All @@ -32,6 +33,10 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.18

- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com".insteadOf "https://github.com"

- uses: technote-space/[email protected]
id: git_diff
with:
Expand All @@ -50,6 +55,10 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.18

- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com".insteadOf "https://github.com"

- uses: technote-space/[email protected]
id: git_diff
with:
Expand Down Expand Up @@ -107,6 +116,10 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.18

- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com".insteadOf "https://github.com"

- uses: technote-space/[email protected]
with:
PATTERNS: |
Expand Down Expand Up @@ -186,6 +199,10 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.18

- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com".insteadOf "https://github.com"

- uses: technote-space/[email protected]
id: git_diff
with:
Expand All @@ -209,6 +226,10 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.18

- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com".insteadOf "https://github.com"

- name: Display go version
run: go version
- name: Install runsim
Expand All @@ -226,6 +247,10 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.18

- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com".insteadOf "https://github.com"

- name: Display go version
run: go version
- uses: technote-space/[email protected]
Expand Down
Loading