From e16feac15dcfc9936b685d1116a7c541ae2505f5 Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Thu, 6 Jun 2024 14:05:09 -0700 Subject: [PATCH 1/2] github: Fix incorrect 'version' file generation The 'version' file is created as part of the release process and is supposed to contain the version number of the tarball. The contents of this file become part of /sys/module/wacom/version, which we rely on to understand what driver version users are running. Recent release (1.0.0, 1.1.0, and 1.2.0) have had faulty version files which just contain the text "input-wacom". The issue was traced to the checkout action used by our tagged-release workflow. This action does not include tags by default, which prevents the git-version-gen script from being able to discover what version of the code is being built. In the absence of a git tag, it falls back to using the directory name instead: 'input-wacom'. Signed-off-by: Jason Gerecke --- .github/workflows/tagged-release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index 01e64012..8c7695d9 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -18,8 +18,10 @@ jobs: steps: # ... - - uses: actions/checkout@master - + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-tags: 'true' - name: "Make Step" run: | ./autogen.sh From b9b47d64df1f532735af916ae5170bf0295ad7c5 Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Thu, 6 Jun 2024 14:41:15 -0700 Subject: [PATCH 2/2] github: Clean up and update tagged-release workflow Several warnings about deprecated functionality are logged when we run the tagged-release workflow. This commit updates the workflow to use the recommended replacements, cleans up some whitespace issues, and simplifies the release process. While we're at it, also tweak the auto-generated release notes to include a marked-up shortlog by default. Signed-off-by: Jason Gerecke --- .github/workflows/tagged-release.yml | 59 ++++++++++++---------------- 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index 8c7695d9..b8b131f7 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -22,30 +22,28 @@ jobs: with: ref: ${{ github.ref }} fetch-tags: 'true' + fetch-depth: 0 + - name: "Make Step" run: | ./autogen.sh make dist echo "done!" - + - name: Get tar file id: get-tar-name - run: echo "::set-output name=fileName::$(find . -type f -iname "*.tar.bz2" -printf "%f\n")" - - - name: Fetch tar file - id: get-tar-path - uses: Rishabh510/Path-lister-action@master - with: - path: "./" - type: ".tar.bz2" + run: echo "fileName=$(find . -type f -iname "*.tar.bz2" -printf "%f\n")" >> $GITHUB_OUTPUT + + - name: Get shortlog + id: get-shortlog + run: | + { + echo 'shortlog<> $GITHUB_OUTPUT - - name: Create Release - uses: "marvinpinto/action-automatic-releases@latest" - id: release-create - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: false - - name: Generate Checksums id: generate-checksums run : | @@ -55,28 +53,23 @@ jobs: echo "md5=$(cut -f1 -d' ' md5sum.txt)" >> $GITHUB_OUTPUT echo "sha1=$(cut -f1 -d' ' sha1sum.txt)" >> $GITHUB_OUTPUT echo "sha256=$(cut -f1 -d' ' sha256sum.txt)" >> $GITHUB_OUTPUT - + - name: Upload Release Asset - id: upload-main-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.release-create.outputs.upload_url }} - asset_path: ${{ steps.get-tar-path.outputs.paths }} - asset_name: ${{ steps.get-tar-name.outputs.fileName }} - asset_content_type: application/zip - - - name: Update Release - id: update-release - uses: tubone24/update_release@v1.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + id: upload-main-asset + uses: softprops/action-gh-release@v2 with: + token: ${{ secrets.GITHUB_TOKEN }} + files: ${{ steps.get-tar-name.outputs.fileName }} + generate_release_notes: false body: | + Commit description goes here. + + ## Commits + ${{ steps.get-shortlog.outputs.shortlog }} + + ## Release **git tag: ${{ github.ref_name }}** ${{ steps.upload-main-asset.outputs.browser_download_url }} md5: `${{ steps.generate-checksums.outputs.md5 }}` sha1: `${{ steps.generate-checksums.outputs.sha1 }}` sha256: `${{ steps.generate-checksums.outputs.sha256 }}` - isAppendBody: true