ci: fix releasing assets #16
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: Hierarchy build | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build: | |
| [ | |
| { | |
| name: hierarchy-app, | |
| platform: linux/amd64, | |
| os: ubuntu-latest, | |
| artifact: "hierarchy-app-linux-amd64", | |
| output: "hierarchy-app", | |
| }, | |
| { | |
| name: hierarchy-app, | |
| platform: windows/amd64, | |
| os: windows-latest, | |
| artifact: "hierarchy-app-windows-amd64.exe", | |
| output: "hierarchy-app.exe", | |
| }, | |
| { | |
| name: hierarchy-app, | |
| platform: darwin/universal, | |
| os: macos-latest, | |
| artifact: "hierarchy-app-darwin-universal", | |
| output: "hierarchy-app", | |
| }, | |
| ] | |
| runs-on: ${{ matrix.build.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: dAppServer/wails-build-action@main | |
| with: | |
| build-name: ${{ matrix.build.name }} | |
| build-platform: ${{ matrix.build.platform }} | |
| build-obfuscate: true | |
| go-version: 1.25 | |
| release: | |
| needs: build | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| - name: Display structure of downloaded files | |
| run: ls -R ./artifacts | |
| - name: Prepare release assets | |
| run: | | |
| mkdir -p release-assets | |
| find ./artifacts -type f | while read file; do | |
| cp "$file" "./release-assets/$(basename "$file")" | |
| chmod +x "./release-assets/$(basename "$file")" 2>/dev/null || true | |
| done | |
| ls -la release-assets/ | |
| - name: Generate changelog | |
| id: generate_changelog | |
| uses: janheinrichmerker/[email protected] | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: Release ${{ github.ref_name }} | |
| body: | | |
| ## Release Notes | |
| ${{ steps.generate_changelog.changelog }} | |
| --- | |
| Release for ${{ github.ref_name }} | |
| ### Assets | |
| - hierarchy-app-linux-amd64 (Linux) | |
| - hierarchy-app-windows-amd64.exe (Windows) | |
| - hierarchy-app-darwin-universal (macOS) | |
| draft: false | |
| prerelease: false | |
| files: | | |
| release-assets/hierarchy-app-* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |