diff --git a/.github/future-release-template.md b/.github/future-release-template.md index e177267..725a4b0 100644 --- a/.github/future-release-template.md +++ b/.github/future-release-template.md @@ -14,6 +14,6 @@ Report issues or suggest features on our [GitHub Issues page](https://github.com ### Technical Changelog -For a complete list of changes, see the [Changelog](https://github.com/berrybytes/awsctl/blob/develop/CHANGELOG.md). +For a complete list of changes, see the [Changelog](https://github.com/berrybytes/awsctl/blob/main/CHANGELOG.md). Thank you for using `awsctl`! diff --git a/.github/initial-release-template.md b/.github/initial-release-template.md index 08eee2e..e145e98 100644 --- a/.github/initial-release-template.md +++ b/.github/initial-release-template.md @@ -37,6 +37,6 @@ This is our first release, and we’d love your input! Report issues or suggest ### Technical Changelog -For a complete list of changes, see the [Changelog](https://github.com/berrybytes/awsctl/blob/develop/CHANGELOG.md). +For a complete list of changes, see the [Changelog](https://github.com/berrybytes/awsctl/blob/main/CHANGELOG.md). Thank you for using `awsctl`! diff --git a/.github/workflows/releaser.yaml b/.github/workflows/releaser.yaml index 4f7f5a7..c136bec 100644 --- a/.github/workflows/releaser.yaml +++ b/.github/workflows/releaser.yaml @@ -45,9 +45,12 @@ jobs: - name: Get current and previous tags id: tags run: | - CURRENT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + # CURRENT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + CURRENT_TAG=$(git tag --sort=-creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1 || echo "") if [ -n "$CURRENT_TAG" ]; then - PREV_TAG=$(git describe --tags --abbrev=0 "$CURRENT_TAG"^ 2>/dev/null || echo "") + # PREV_TAG=$(git describe --tags --abbrev=0 "$CURRENT_TAG"^ 2>/dev/null || echo "") + PREV_TAG=$(git tag --sort=-creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sed -n 2p || echo "") + else PREV_TAG="" fi @@ -65,7 +68,8 @@ jobs: echo "skip=false" >> $GITHUB_OUTPUT exit 0 fi - COMMIT_COUNT=$(git rev-list --count "$CURRENT_TAG..HEAD" --no-merges) + git fetch origin main --tags + COMMIT_COUNT=$(git rev-list --count "$CURRENT_TAG..origin/main" --no-merges) if [ "$COMMIT_COUNT" -eq 0 ]; then echo "No new commits since $CURRENT_TAG. Skipping release." echo "skip=true" >> $GITHUB_OUTPUT