|
27 | 27 | jobs:
|
28 | 28 | build:
|
29 | 29 | runs-on: ubuntu-latest
|
30 |
| - |
| 30 | + outputs: |
| 31 | + changelog: ${{ steps.generate_changelog.outputs.changelog }} |
31 | 32 | strategy:
|
32 | 33 | matrix:
|
33 | 34 | node-version: [ 20.x ]
|
|
81 | 82 | else
|
82 | 83 | echo "No changes to CHANGELOG.md"
|
83 | 84 | fi
|
| 85 | + - name: Output changelong from ${{ env.PREV }} |
| 86 | + continue-on-error: true |
| 87 | + id: generate_changelog |
| 88 | + if: ${{ !contains(github.event.inputs.version, '-') }} |
| 89 | + env: |
| 90 | + PREV: ${{ env.PREV }} |
| 91 | + run: | |
| 92 | + # Run git-cliff again and capture its output in a variable |
| 93 | + changelog=$(git-cliff $PREV..HEAD --tag v${{ github.event.inputs.version }}) |
| 94 | + # Set the changelog as an output for the step using the new GITHUB_OUTPUT file |
| 95 | + echo "changelog<<EOF" >> $GITHUB_OUTPUT |
| 96 | + echo "$changelog" >> $GITHUB_OUTPUT |
| 97 | + echo "EOF" >> $GITHUB_OUTPUT |
84 | 98 | - run: yarn install --immutable
|
85 | 99 | env:
|
86 | 100 | YARN_ENABLE_SCRIPTS: false
|
@@ -149,9 +163,17 @@ jobs:
|
149 | 163 |
|
150 | 164 | release-changelog: # TODO this changelog is different than the git-cliff one above
|
151 | 165 | needs: build
|
152 |
| - uses: ./.github/workflows/release_changelog.yml |
153 |
| - with: |
154 |
| - version: ${{ github.event.inputs.version }} |
| 166 | + runs-on: ubuntu-latest |
| 167 | + steps: |
| 168 | + - name: Create release |
| 169 | + uses: softprops/action-gh-release@v2 |
| 170 | + with: |
| 171 | + tag_name: v${{ inputs.version }} |
| 172 | + name: v${{ inputs.version }} |
| 173 | + body: ${{ needs.build.outputs.changelog }} |
| 174 | + prerelease: ${{ contains(inputs.version, 'beta') || contains(inputs.version, 'alpha') }} |
| 175 | + env: |
| 176 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} |
155 | 177 |
|
156 | 178 | update-version-checker:
|
157 | 179 | needs: publish-docker
|
|
0 commit comments