Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
skudasov committed Sep 11, 2024
1 parent bb11f73 commit 699b352
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release-go-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
- name: Fetch all tags
run: |
git fetch --tags
- name: Extract Package Name from Tag
id: extract_package_name
run: |

Check failure on line 33 in .github/workflows/release-go-module.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release-go-module.yml#L33

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

Check failure on line 33 in .github/workflows/release-go-module.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release-go-module.yml#L33

shellcheck reported issue in this script: SC2086:info:9:28: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release-go-module.yml:33:9: shellcheck reported issue in this script: SC2086:info:9:28: Double quote to prevent globbing and word splitting [shellcheck]
Expand All @@ -48,7 +50,7 @@ jobs:
# Find the latest tag for the same package that is not the current tag
LAST_TAG=$(git describe --abbrev=0 --match "$PACKAGE_NAME/v*" --tags $(git rev-list --tags --skip=1 --max-count=1))
echo "Last tag: $LAST_TAG"
echo "Last tag: ${LAST_TAG}"
# If no previous tag is found, use the initial commit as the reference
if [ -z "$LAST_TAG" ]; then
Expand All @@ -58,6 +60,7 @@ jobs:
# Extract the version part of the last tag
LAST_TAG_VERSION=$(echo "$LAST_TAG" | cut -d'/' -f2)
echo "Last tag version: $LAST_TAG_VERSION"
echo "LAST_TAG_VERSION=${LAST_TAG_VERSION}" >> $GITHUB_ENV
# Get the commits between the last tag and the current tag
COMMITS=$(git log "$LAST_TAG..$PACKAGE_NAME/$VERSION" --pretty=format:"- %s (%h)")
Expand All @@ -78,13 +81,13 @@ jobs:
run: |
go install golang.org/x/exp/cmd/gorelease@latest
- name: Run gorelease to check for breaking changes
working-directory: tools/breakingchanges
working-directory: ${{ env.PACKAGE_NAME }}
id: check_breaking_changes
run: |

Check failure on line 86 in .github/workflows/release-go-module.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release-go-module.yml#L86

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

Check failure on line 86 in .github/workflows/release-go-module.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release-go-module.yml#L86

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

Check failure on line 86 in .github/workflows/release-go-module.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release-go-module.yml#L86

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

Check failure on line 86 in .github/workflows/release-go-module.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release-go-module.yml#L86

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

Check failure on line 86 in .github/workflows/release-go-module.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/release-go-module.yml#L86

shellcheck reported issue in this script: SC2086:info:9:15: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/release-go-module.yml:86:9: shellcheck reported issue in this script: SC2086:info:9:15: Double quote to prevent globbing and word splitting [shellcheck]
set +e # Disable exit on error to capture output even if the command fails
echo "Last tag version: ${LAST_TAG_VERSION}"
echo "Last tag version: ${{ env.LAST_TAG_VERSION }}"
echo "Current tag version: ${VERSION}"
BREAKING_CHANGES=$(gorelease -base=${LAST_TAG_VERSION} -version=${VERSION} 2>&1)
BREAKING_CHANGES=$(gorelease -base=${{ env.LAST_TAG_VERSION }} -version=${VERSION} 2>&1)
echo "Breaking changes: ${BREAKING_CHANGES}"
set -e # Re-enable exit on error for the subsequent steps
echo "BREAKING_CHANGES<<EOF" >> $GITHUB_ENV
Expand Down

0 comments on commit 699b352

Please sign in to comment.