diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a30135..bab1ee1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,7 +50,19 @@ jobs: base_version="${{ env.VERSION }}" unique_tag="${base_version}-build-${{ github.run_number }}" echo "UNIQUE_TAG=$unique_tag" >> $GITHUB_ENV - + + - name: Get Previous Tag + id: get_prev_tag + run: | + prev_tag=$(git describe --tags --abbrev=0) + echo "PREV_TAG=$prev_tag" >> $GITHUB_ENV + + - name: Generate Changelog + id: generate_changelog + run: | + changelog=$(git log ${{ env.PREV_TAG }}..HEAD --pretty=format:"%h - %s (%an)") + echo "CHANGELOG=$changelog" >> $GITHUB_ENV + - name: Create Release uses: ncipollo/release-action@v1 with: @@ -58,7 +70,9 @@ jobs: tag: v${{ env.UNIQUE_TAG }} token: ${{ secrets.KOCAK }} name: "Release v${{ env.UNIQUE_TAG }}" - body: "Rilis otomatis dari GitHub Actions" + body: | + ## Changelog + ${{ env.CHANGELOG }} - name: Checkout jeketi-app Repository uses: actions/checkout@v3