|
1 | | -# let the workflow clarifie. the reasoning behind releasing the previous version. |
| 1 | +# let the workflow clarify. the reasoning behind releasing the previous version. |
2 | 2 | # The mod.json file in th main branch contains the next version. |
3 | 3 | # it declares the next version that's under development, |
4 | 4 | # and the workflow's purpose is to create a release for the code that represents the previous stable version. |
@@ -75,37 +75,37 @@ jobs: |
75 | 75 | echo "Tag $RELEASE_TAG does not exist. Proceeding with release creation." |
76 | 76 | fi |
77 | 77 |
|
78 | | - - name: Generate Release Notes |
79 | | - id: generate_release_notes |
80 | | - if: steps.check_tag_exists.outputs.TAG_EXISTS == 'false' |
81 | | - run: | |
82 | | - VERSION="${{ steps.get_version.outputs.VERSION }}" |
83 | | - RELEASE_TAG="${{ steps.calculate_release_version.outputs.RELEASE_TAG }}" |
84 | | -
|
85 | | - # Get a list of contributors for this release |
86 | | - CONTRIBUTORS=$(git log --pretty="%an <%ae>" --since="$RELEASE_TAG" | sort -u) |
87 | | -
|
88 | | - # Generate the commit list, explicitly handling the first release case |
89 | | - if [[ "$(git describe --abbrev=0 --tags 2>/dev/null)" ]]; then |
90 | | - RELEASE_NOTES=$(git log --pretty=format:"- %s" $(git describe --abbrev=0 --tags)..HEAD) |
91 | | - else |
92 | | - # No tags exist yet, so grab ALL commits |
93 | | - RELEASE_NOTES=$(git log --pretty=format:"- %s" $(git rev-list --max-parents=0 HEAD)..HEAD) |
94 | | - fi |
95 | | -
|
96 | | - # Construct the full release notes |
97 | | - INTRO="Release notes for version $RELEASE_TAG.\n\n" |
98 | | - if [[ -n "$CONTRIBUTORS" ]]; then |
99 | | - INTRO="$INTRO Contributors: $CONTRIBUTORS \n\n" |
100 | | - fi |
101 | | -
|
102 | | - DOWNLOAD_LINK="Download Link: https://autocivp.netlify.app/download/latest.zip\n\n" |
103 | | - FULL_RELEASE_NOTES="$INTRO$DOWNLOAD_LINK$RELEASE_NOTES" |
104 | | -
|
105 | | - # Output the release notes |
106 | | - echo "RELEASE_NOTES<<EOF" >> $GITHUB_OUTPUT |
107 | | - echo "$FULL_RELEASE_NOTES" >> $GITHUB_OUTPUT |
108 | | - echo "EOF" >> $GITHUB_OUTPUT |
| 78 | + - name: Generate Release Notes |
| 79 | + id: generate_release_notes |
| 80 | + if: steps.check_tag_exists.outputs.TAG_EXISTS == 'false' |
| 81 | + run: | |
| 82 | + VERSION="${{ steps.get_version.outputs.VERSION }}" |
| 83 | + RELEASE_TAG="${{ steps.calculate_release_version.outputs.RELEASE_TAG }}" |
| 84 | +
|
| 85 | + # Get a list of contributors for this release |
| 86 | + CONTRIBUTORS=$(git log --pretty="%an <%ae>" --since="$RELEASE_TAG" | sort -u) |
| 87 | +
|
| 88 | + # Generate the commit list, explicitly handling the first release case |
| 89 | + if [[ "$(git describe --abbrev=0 --tags 2>/dev/null)" ]]; then |
| 90 | + RELEASE_NOTES=$(git log --pretty=format:"- %s" $(git describe --abbrev=0 --tags)..HEAD) |
| 91 | + else |
| 92 | + # No tags exist yet, so grab ALL commits |
| 93 | + RELEASE_NOTES=$(git log --pretty=format:"- %s" $(git rev-list --max-parents=0 HEAD)..HEAD) |
| 94 | + fi |
| 95 | +
|
| 96 | + # Construct the full release notes |
| 97 | + INTRO="Release notes for version $RELEASE_TAG.\n\n" |
| 98 | + if [[ -n "$CONTRIBUTORS" ]]; then |
| 99 | + INTRO="$INTRO Contributors: $CONTRIBUTORS \n\n" |
| 100 | + fi |
| 101 | +
|
| 102 | + DOWNLOAD_LINK="Download Link: https://autocivp.netlify.app/download/latest.zip\n\n" |
| 103 | + FULL_RELEASE_NOTES="$INTRO$DOWNLOAD_LINK$RELEASE_NOTES" |
| 104 | +
|
| 105 | + # Output the release notes |
| 106 | + echo "RELEASE_NOTES<<EOF" >> $GITHUB_OUTPUT |
| 107 | + echo "$FULL_RELEASE_NOTES" >> $GITHUB_OUTPUT |
| 108 | + echo "EOF" >> $GITHUB_OUTPUT |
109 | 109 |
|
110 | 110 | - name: Create Release |
111 | 111 | uses: actions/create-release@v1 |
|
0 commit comments