Skip to content

Commit

Permalink
another test release, build with default command
Browse files Browse the repository at this point in the history
  • Loading branch information
skudasov committed Sep 11, 2024
1 parent 7bfd8d0 commit 9de8b5f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
46 changes: 27 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,25 @@ jobs:
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
echo "$COMMITS" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.6'
- name: Install gorelease tool
run: |
go install golang.org/x/exp/cmd/gorelease@latest
- name: Run gorelease to check for breaking changes
working-directory: tools/breakingchanges
id: check_breaking_changes
run: |

Check failure on line 83 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L83

shellcheck reported issue in this script: SC2086:info:2:35: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:83:9: shellcheck reported issue in this script: SC2086:info:2:35: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 83 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L83

shellcheck reported issue in this script: SC2129:style:4:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]
Raw output
.github/workflows/release.yml:83:9: shellcheck reported issue in this script: SC2129:style:4:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]

Check failure on line 83 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L83

shellcheck reported issue in this script: SC2086:info:4:35: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:83:9: shellcheck reported issue in this script: SC2086:info:4:35: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 83 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L83

shellcheck reported issue in this script: SC2086:info:5:19: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:83:9: shellcheck reported issue in this script: SC2086:info:5:19: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 83 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L83

shellcheck reported issue in this script: SC2086:info:6:15: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:83:9: shellcheck reported issue in this script: SC2086:info:6:15: Double quote to prevent globbing and word splitting [shellcheck]
set +e # Disable exit on error to capture output even if the command fails
OUTPUT=$(go run cmd/main.go -path $GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }} 2>&1)
set -e # Re-enable exit on error for the subsequent steps
echo "FULL_RELEASE_NOTES<<EOF" >> $GITHUB_ENV
echo "$OUTPUT" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Read Additional Release Notes from File
if: always()
working-directory: ${{ env.PACKAGE_NAME }}
id: read_additional_notes
run: |

Check failure on line 94 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L94

shellcheck reported issue in this script: SC2129:style:7:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]
Raw output
.github/workflows/release.yml:94:9: shellcheck reported issue in this script: SC2129:style:7:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]

Check failure on line 94 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L94

shellcheck reported issue in this script: SC2086:info:7:37: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:94:9: shellcheck reported issue in this script: SC2086:info:7:37: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 94 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L94

shellcheck reported issue in this script: SC2086:info:8:14: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:94:9: shellcheck reported issue in this script: SC2086:info:8:14: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 94 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L94

shellcheck reported issue in this script: SC2086:info:9:28: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:94:9: shellcheck reported issue in this script: SC2086:info:9:28: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 94 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L94

shellcheck reported issue in this script: SC2086:info:10:17: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:94:9: shellcheck reported issue in this script: SC2086:info:10:17: Double quote to prevent globbing and word splitting [shellcheck]
Expand All @@ -89,40 +107,30 @@ jobs:
echo "Error: Release notes file '.changeset/${{ env.VERSION }}.md' not found."
exit 1
fi
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.6'
- name: Install gorelease tool
run: |
go install golang.org/x/exp/cmd/gorelease@latest
- name: Run gorelease to check for breaking changes
working-directory: tools/breakingchanges
id: check_breaking_changes
run: |
go run cmd/main.go -path $GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}
- name: Create GitHub Release
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt-get install -y gh
gh release create "${{ env.PACKAGE_NAME }}-${{ env.VERSION }}" --title "${{ env.PACKAGE_NAME }} ${{ env.VERSION }}" --notes "Release for ${{ env.PACKAGE_NAME }} version ${{ env.VERSION }}${{ env.FULL_RELEASE_NOTES }} ${{ env.BREAKING_CHANGES }}" || true
- name: Check if 'cmd' directory exists and set environment variable
run: |

Check failure on line 118 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L118

shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:118:9: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 118 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release.yml#L118

shellcheck reported issue in this script: SC2086:info:4:41: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release.yml:118:9: shellcheck reported issue in this script: SC2086:info:4:41: Double quote to prevent globbing and word splitting [shellcheck]
if [ -d "$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/cmd" ] && [ -f "$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/cmd/main.go" ]; then
echo "CMD_EXISTS=true" >> $GITHUB_ENV
if [ -f "$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/cmd/main.go" ]; then
echo "CMD_ENTRYPOINT_EXISTS=true" >> $GITHUB_ENV
else
echo "CMD_EXISTS=false" >> $GITHUB_ENV
echo "CMD_ENTRYPOINT_EXISTS=false" >> $GITHUB_ENV
fi
- uses: wangyoucao577/go-release-action@v1
if: env.CMD_EXISTS == 'true'
- name: Build binary release
uses: wangyoucao577/go-release-action@v1
if: env.CMD_ENTRYPOINT_EXISTS == 'true'
with:
build_command: go build cmd/main.go
build_command: go build -o ${{ env.PACKAGE_NAME }}/main.go
github_token: ${{ secrets.GITHUB_TOKEN }}
goversion: '1.22.6'
goos: ${{ matrix.platform }}
goarch: ${{ matrix.goarch }}
release_name: ${{ env.PACKAGE_NAME }}
release_tag: ${{ env.PACKAGE_NAME}}-${{ env.VERSION }}
project_path: ${{ env.PACKAGE_NAME }}
asset_name: ${{ env.PACKAGE_NAME }}-${{ env.VERSION }}-${{ matrix.platform }}-${{ matrix.goarch }}
asset_name: ${{ env.PACKAGE_NAME }}-${{ env.VERSION }}-${{ matrix.platform }}-${{ matrix.goarch }}

0 comments on commit 9de8b5f

Please sign in to comment.