From db08a2161c4b50301b6ec4363bf5375b2e6e7575 Mon Sep 17 00:00:00 2001 From: SoftwareRat <40393784+SoftwareRat@users.noreply.github.com> Date: Tue, 4 Aug 2026 13:56:08 +0000 Subject: [PATCH 1/2] make a github actions --- .github/workflows/build.yml | 85 +++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f6bcd72 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,85 @@ +name: Build and Release PS3Dec + +on: + push: + branches: [ "main" ] + tags: [ "v*" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + name: Build on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + artifact_name: ps3dec-linux + asset_name: ps3dec-linux.tar.gz + - os: windows-latest + target: x86_64-pc-windows-msvc + artifact_name: ps3dec.exe + asset_name: ps3dec-windows.zip + - os: macos-latest + target: x86_64-apple-darwin + artifact_name: ps3dec + asset_name: ps3dec-macos.tar.gz + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + + - name: Rust Cache + uses: swatinem/rust-cache@v2 + + - name: Build Release + run: cargo build --release --target ${{ matrix.target }} + + - name: Package Artifacts (Windows) + if: matrix.os == 'windows-latest' + run: | + cd target/${{ matrix.target }}/release + tar -czf ../../../${{ matrix.asset_name }} ${{ matrix.artifact_name }} + shell: bash + + - name: Package Artifacts (Linux / macOS) + if: matrix.os != 'windows-latest' + run: | + cd target/${{ matrix.target }}/release + tar -czf ../../../${{ matrix.asset_name }} ${{ matrix.artifact_name }} + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.asset_name }} + path: ${{ matrix.asset_name }} + + release: + name: Create GitHub Release + needs: build + if: startsWith(github.ref, 'refs/tags/v') # Erstellt nur ein echtes Release, wenn ein Tag gepusht wurde + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + merge-multiple: true + + - name: Create Release and Upload Assets + uses: softprops/action-gh-release@v2 + with: + files: artifacts/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 951a9e9ebe18f8f7db3296da8493f082c827127f Mon Sep 17 00:00:00 2001 From: SoftwareRat <40393784+SoftwareRat@users.noreply.github.com> Date: Tue, 4 Aug 2026 13:58:28 +0000 Subject: [PATCH 2/2] wrong filename --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6bcd72..5db2d2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,15 +18,15 @@ jobs: include: - os: ubuntu-latest target: x86_64-unknown-linux-gnu - artifact_name: ps3dec-linux + artifact_name: ps3decrs asset_name: ps3dec-linux.tar.gz - os: windows-latest target: x86_64-pc-windows-msvc - artifact_name: ps3dec.exe + artifact_name: ps3decrs.exe asset_name: ps3dec-windows.zip - os: macos-latest target: x86_64-apple-darwin - artifact_name: ps3dec + artifact_name: ps3decrs asset_name: ps3dec-macos.tar.gz steps: @@ -66,7 +66,7 @@ jobs: release: name: Create GitHub Release needs: build - if: startsWith(github.ref, 'refs/tags/v') # Erstellt nur ein echtes Release, wenn ein Tag gepusht wurde + if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest permissions: contents: write @@ -82,4 +82,4 @@ jobs: with: files: artifacts/* env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}