diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7faa1cf..e90c839 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,8 @@ name: "Release" +permissions: + contents: write + on: workflow_dispatch: inputs: @@ -22,7 +25,7 @@ jobs: os: ubuntu-latest make: bash scripts/package-linux.sh artifact_path: | - echo "ARTIFACT_PATH=.temp/" >> "$GITHUB_ENV" + echo "ARTIFACT_PATH=.temp" >> "$GITHUB_ENV" runs-on: ${{ matrix.target.os }} steps: - uses: actions/checkout@v3 @@ -72,10 +75,25 @@ jobs: run: ${{ matrix.target.artifact_path }} - name: Upload artifact + if: matrix.target.target == 'linux' + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.target.target }} + path: | + .temp/mannager-*linux.tar.gz + .temp/MANNager*.AppImage + .temp/mannager*.flatpak + if-no-files-found: error + include-hidden-files: true + + - name: Upload artifact + if: matrix.target.target == 'windows' uses: actions/upload-artifact@v4 with: name: ${{ matrix.target.target }} path: ${{ env.ARTIFACT_PATH }} + if-no-files-found: error + include-hidden-files: true create-release: needs: build @@ -105,23 +123,19 @@ jobs: target: - artifact: windows os: windows - artifact_name: | - echo "ARTIFACT_NAME=mannager-installer.msi" >> "$GITHUB_ENV" + artifact_name: "mannager-installer.msi" asset_type: application/x-dosexec - artifact: linux_tar os: linux - artifact_name: | - echo "ARTIFACT_NAME=$(ls .temp/mannager-*linux.tar.gz | head -n 1)" >> "$GITHUB_ENV" + artifact_name: "mannager-*linux.tar.gz" asset_type: application/gzip - artifact: linux_appimage os: linux - artifact_name: | - echo "ARTIFACT_NAME=$(ls .temp/MANNager*.AppImage | head -n 1)" >> "$GITHUB_ENV" + artifact_name: "MANNager*.AppImage" asset_type: application/octet-stream - artifact: linux_flatpak os: linux - artifact_name: | - echo "ARTIFACT_NAME=mannager.flatpak" >> "$GITHUB_ENV" # Replace with the actual Flatpak file name + artifact_name: "mannager*.flatpak" asset_type: application/octet-stream runs-on: ubuntu-latest @@ -137,10 +151,27 @@ jobs: name: ${{ matrix.target.os }} path: ${{ matrix.target.os }} - - name: Set artifact name - run: ${{ matrix.target.artifact_name }} + - name: Set artifact name for linux + if: matrix.target.os == 'linux' + run: | + echo "ARTIFACT_NAME=$(ls ./linux/${{ matrix.target.artifact_name }} | head -n 1)" >> "$GITHUB_ENV" + + - name: Set artifact name for windows + if: matrix.target.os == 'windows' + run: | + echo "ARTIFACT_NAME=mannager-installer.msi" >> "$GITHUB_ENV" + + - name: Upload asset + if: matrix.target.os == 'linux' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ${{ env.ARTIFACT_NAME }} + asset_name: ${{ env.ARTIFACT_NAME }} + asset_content_type: ${{ matrix.target.asset_type }} - name: Upload asset + if: matrix.target.os == 'windows' uses: actions/upload-release-asset@v1 with: upload_url: ${{ needs.create-release.outputs.upload_url }} diff --git a/assets/linux/flatpak/generated-sources.json b/assets/linux/flatpak/generated-sources.json index 8f99c93..1525ec9 100644 --- a/assets/linux/flatpak/generated-sources.json +++ b/assets/linux/flatpak/generated-sources.json @@ -44,6 +44,19 @@ "dest": "cargo/vendor/addr2line-0.24.1", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/adler/adler-1.0.2.crate", + "sha256": "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe", + "dest": "cargo/vendor/adler-1.0.2" + }, + { + "type": "inline", + "contents": "{\"package\": \"f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe\", \"files\": {}}", + "dest": "cargo/vendor/adler-1.0.2", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -499,6 +512,19 @@ "dest": "cargo/vendor/bit-vec-0.6.3", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/bit_field/bit_field-0.10.2.crate", + "sha256": "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61", + "dest": "cargo/vendor/bit_field-0.10.2" + }, + { + "type": "inline", + "contents": "{\"package\": \"dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61\", \"files\": {}}", + "dest": "cargo/vendor/bit_field-0.10.2", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -1817,6 +1843,19 @@ "dest": "cargo/vendor/event-listener-strategy-0.5.2", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/exr/exr-1.72.0.crate", + "sha256": "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4", + "dest": "cargo/vendor/exr-1.72.0" + }, + { + "type": "inline", + "contents": "{\"package\": \"887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4\", \"files\": {}}", + "dest": "cargo/vendor/exr-1.72.0", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -1908,6 +1947,19 @@ "dest": "cargo/vendor/float_next_after-1.0.0", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/flume/flume-0.11.0.crate", + "sha256": "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181", + "dest": "cargo/vendor/flume-0.11.0" + }, + { + "type": "inline", + "contents": "{\"package\": \"55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181\", \"files\": {}}", + "dest": "cargo/vendor/flume-0.11.0", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -2935,6 +2987,19 @@ "dest": "cargo/vendor/igd-0.12.1", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/image/image-0.24.9.crate", + "sha256": "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d", + "dest": "cargo/vendor/image-0.24.9" + }, + { + "type": "inline", + "contents": "{\"package\": \"5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d\", \"files\": {}}", + "dest": "cargo/vendor/image-0.24.9", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -3117,6 +3182,19 @@ "dest": "cargo/vendor/js-sys-0.3.70", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/kamadak-exif/kamadak-exif-0.5.5.crate", + "sha256": "ef4fc70d0ab7e5b6bafa30216a6b48705ea964cdfc29c050f2412295eba58077", + "dest": "cargo/vendor/kamadak-exif-0.5.5" + }, + { + "type": "inline", + "contents": "{\"package\": \"ef4fc70d0ab7e5b6bafa30216a6b48705ea964cdfc29c050f2412295eba58077\", \"files\": {}}", + "dest": "cargo/vendor/kamadak-exif-0.5.5", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -3169,6 +3247,19 @@ "dest": "cargo/vendor/kurbo-0.11.1", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/lebe/lebe-0.5.2.crate", + "sha256": "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8", + "dest": "cargo/vendor/lebe-0.5.2" + }, + { + "type": "inline", + "contents": "{\"package\": \"03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8\", \"files\": {}}", + "dest": "cargo/vendor/lebe-0.5.2", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -3520,6 +3611,19 @@ "dest": "cargo/vendor/mime-0.3.17", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/miniz_oxide/miniz_oxide-0.7.4.crate", + "sha256": "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08", + "dest": "cargo/vendor/miniz_oxide-0.7.4" + }, + { + "type": "inline", + "contents": "{\"package\": \"b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08\", \"files\": {}}", + "dest": "cargo/vendor/miniz_oxide-0.7.4", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -3546,6 +3650,19 @@ "dest": "cargo/vendor/mio-1.0.2", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/mutate_once/mutate_once-0.1.1.crate", + "sha256": "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b", + "dest": "cargo/vendor/mutate_once-0.1.1" + }, + { + "type": "inline", + "contents": "{\"package\": \"16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b\", \"files\": {}}", + "dest": "cargo/vendor/mutate_once-0.1.1", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -4677,6 +4794,19 @@ "dest": "cargo/vendor/pty-process-0.4.0", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/qoi/qoi-0.4.1.crate", + "sha256": "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001", + "dest": "cargo/vendor/qoi-0.4.1" + }, + { + "type": "inline", + "contents": "{\"package\": \"7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001\", \"files\": {}}", + "dest": "cargo/vendor/qoi-0.4.1", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -5886,6 +6016,19 @@ "dest": "cargo/vendor/thiserror-impl-1.0.64", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/tiff/tiff-0.9.1.crate", + "sha256": "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e", + "dest": "cargo/vendor/tiff-0.9.1" + }, + { + "type": "inline", + "contents": "{\"package\": \"ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e\", \"files\": {}}", + "dest": "cargo/vendor/tiff-0.9.1", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", @@ -7836,6 +7979,19 @@ "dest": "cargo/vendor/zstd-sys-2.0.13+zstd.1.5.6", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/zune-inflate/zune-inflate-0.2.54.crate", + "sha256": "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02", + "dest": "cargo/vendor/zune-inflate-0.2.54" + }, + { + "type": "inline", + "contents": "{\"package\": \"73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02\", \"files\": {}}", + "dest": "cargo/vendor/zune-inflate-0.2.54", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip", diff --git a/scripts/package-linux.sh b/scripts/package-linux.sh index 41acddc..9944259 100755 --- a/scripts/package-linux.sh +++ b/scripts/package-linux.sh @@ -92,6 +92,8 @@ create_appimage() { } build_flatpak() { + echo "Building a flatpak" + flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo flatpak install --noninteractive --user flathub org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08 org.freedesktop.Sdk.Extension.rust-stable//23.08