Browse Source

fix: gen changelog and tag in the right place (#2443)

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
Moritz Johner 2 years ago
parent
commit
891df5553a
1 changed files with 7 additions and 25 deletions
  1. 7 25
      .github/workflows/release.yml

+ 7 - 25
.github/workflows/release.yml

@@ -25,36 +25,18 @@ jobs:
         uses: actions/checkout@v3
         uses: actions/checkout@v3
         with:
         with:
           fetch-depth: 0
           fetch-depth: 0
+          ref: ${{ github.event.inputs.source_ref }}
 
 
       - name: Create Release
       - name: Create Release
         uses: softprops/action-gh-release@v1
         uses: softprops/action-gh-release@v1
         with:
         with:
           tag_name: ${{ github.event.inputs.version }}
           tag_name: ${{ github.event.inputs.version }}
-        env:
-          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
-
-      - name: Build Changelog
-        id: build_changelog
-        uses: mikepenz/release-changelog-builder-action@v4
-        with:
-          configuration: "changelog.json"
-          toTag: ${{ github.event.inputs.version }}
-          commitMode: true
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-      - name: create changelog file
-        run: |
-          echo "Image: \`${{ env.IMAGE_NAME }}:${{ github.event.inputs.version }}\`" >> .changelog
-          echo "Image: \`${{ env.IMAGE_NAME }}:${{ github.event.inputs.version }}-ubi\`" >> .changelog
-          echo "Image: \`${{ env.IMAGE_NAME }}:${{ github.event.inputs.version }}-ubi-boringssl\`" >> .changelog
-          echo "${{ steps.build_changelog.outputs.changelog }}" >> .changelog
-
-      - name: Update Release
-        uses: softprops/action-gh-release@v1
-        with:
-          tag_name: ${{ github.event.inputs.version }}
-          body_path: .changelog
+          target_commitish: ${{ github.event.inputs.source_ref }}
+          generate_release_notes: true
+          body: |
+            Image: `${{ env.IMAGE_NAME }}:${{ github.event.inputs.version }}`
+            Image: `${{ env.IMAGE_NAME }}:${{ github.event.inputs.version }}-ubi`
+            Image: `${{ env.IMAGE_NAME }}:${{ github.event.inputs.version }}-ubi-boringssl`
         env:
         env:
           GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
           GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"