Merge pull request #11 from mx1up/fix/corrupt_macos_binary #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'release/*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/build.yml | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Extract version from tag | |
| id: release_info | |
| shell: bash | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/release/} | |
| NOTES=$(awk "/^## $VERSION/ {flag=1; next} /^## / {if (flag) exit} flag" CHANGELOG.md) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "notes<<EOF" >> $GITHUB_OUTPUT | |
| echo "$NOTES" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Download Windows artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-build | |
| path: out/windows | |
| - name: Download Linux artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-build | |
| path: out/linux | |
| - name: Download macOS artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-build | |
| path: out/macos | |
| - name: Create zip files with version | |
| run: | | |
| cd out | |
| zip -r fdupes_gui-${{ steps.release_info.outputs.version }}-windows.zip windows/* | |
| tar cvfz fdupes_gui-${{ steps.release_info.outputs.version }}-linux.x86_64.tar.gz -C linux . | |
| tar cvfz fdupes_gui-${{ steps.release_info.outputs.version }}-macos.universal.tar.gz -C macos . | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: "v${{ steps.release_info.outputs.version }}" | |
| body: ${{ steps.release_info.outputs.notes }} | |
| fail_on_unmatched_files: true | |
| files: | | |
| out/fdupes_gui-${{ steps.release_info.outputs.version }}-windows.zip | |
| out/fdupes_gui-${{ steps.release_info.outputs.version }}-linux.x86_64.tar.gz | |
| out/fdupes_gui-${{ steps.release_info.outputs.version }}-macos.universal.tar.gz |