-
Notifications
You must be signed in to change notification settings - Fork 0
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
19 changed files
with
305 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This script is provided by github.com/bool64/dev. | ||
name: gorelease | ||
on: | ||
pull_request: | ||
|
||
# Cancel the workflow in progress in newer build is about to start. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
GO_VERSION: 1.23.x | ||
jobs: | ||
gorelease: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go stable | ||
if: env.GO_VERSION != 'tip' | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Install Go tip | ||
if: env.GO_VERSION == 'tip' | ||
run: | | ||
curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz | ||
ls -lah gotip.tar.gz | ||
mkdir -p ~/sdk/gotip | ||
tar -C ~/sdk/gotip -xzf gotip.tar.gz | ||
~/sdk/gotip/bin/go version | ||
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Gorelease cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/bin/gorelease | ||
key: ${{ runner.os }}-gorelease-generic | ||
- name: Gorelease | ||
id: gorelease | ||
run: | | ||
test -e ~/go/bin/gorelease || go install golang.org/x/exp/cmd/gorelease@latest | ||
OUTPUT=$(gorelease 2>&1 || exit 0) | ||
echo "${OUTPUT}" | ||
echo "report<<EOF" >> $GITHUB_OUTPUT && echo "$OUTPUT" >> $GITHUB_OUTPUT && echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Comment report | ||
continue-on-error: true | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: gorelease | ||
message: | | ||
### Go API Changes | ||
<pre> | ||
${{ steps.gorelease.outputs.report }} | ||
</pre> |
Oops, something went wrong.