diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff2d346d4..93d33e2d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,9 +39,6 @@ on: APPLE_NOTARIZE_PASSWORD: description: Password used for notarizing macOS builds required: false - CACHIX_AUTH_TOKEN: - description: Private token for authenticating against Cachix cache - required: false GPG_PRIVATE_KEY: description: Private key for AppImage signing required: false @@ -667,56 +664,3 @@ jobs: bundle: PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-Flatpak.flatpak manifest-path: flatpak/org.prismlauncher.PrismLauncher.yml arch: ${{ matrix.arch }} - - nix: - name: Nix (${{ matrix.system }}) - - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-22.04 - system: x86_64-linux - - - os: ubuntu-22.04-arm - system: aarch64-linux - - - os: macos-13 - system: x86_64-darwin - - - os: macos-14 - system: aarch64-darwin - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install Nix - uses: cachix/install-nix-action@v30 - - # For PRs - - name: Setup Nix Magic Cache - uses: DeterminateSystems/magic-nix-cache-action@v8 - - # For in-tree builds - - name: Setup Cachix - uses: cachix/cachix-action@v15 - with: - name: prismlauncher - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - - - name: Run flake checks - run: | - nix flake check --print-build-logs --show-trace - - - name: Build debug package - if: ${{ inputs.build_type == 'Debug' }} - run: | - nix build --print-build-logs .#prismlauncher-debug - - - name: Build release package - if: ${{ inputs.build_type != 'Debug' }} - run: | - nix build --print-build-logs .#prismlauncher diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 000000000..f167440cd --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,80 @@ +name: Nix + +on: + push: + paths-ignore: + - "**.md" + - "**/LICENSE" + - ".github/ISSUE_TEMPLATE/**" + - ".markdownlint**" + - "flatpak/**" + tags: + - "*" + pull_request: + paths-ignore: + - "**.md" + - "**/LICENSE" + - ".github/ISSUE_TEMPLATE/**" + - ".markdownlint**" + - "flatpak/**" + workflow_dispatch: + +permissions: + contents: read + +env: + DEBUG: ${{ github.ref_type != 'tag' }} + +jobs: + build: + name: Build (${{ matrix.system }}) + + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-22.04 + system: x86_64-linux + + - os: ubuntu-22.04-arm + system: aarch64-linux + + - os: macos-13 + system: x86_64-darwin + + - os: macos-14 + system: aarch64-darwin + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: cachix/install-nix-action@v30 + + # For PRs + - name: Setup Nix Magic Cache + uses: DeterminateSystems/magic-nix-cache-action@v9 + + # For in-tree builds + - name: Setup Cachix + uses: cachix/cachix-action@v15 + with: + name: prismlauncher + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + + - name: Run Flake checks + run: | + nix flake check --print-build-logs --show-trace + + - name: Build debug package + if: ${{ env.DEBUG }} + run: | + nix build --print-build-logs .#prismlauncher-debug + + - name: Build release package + if: ${{ !env.DEBUG }} + run: | + nix build --print-build-logs .#prismlauncher diff --git a/.github/workflows/trigger_builds.yml b/.github/workflows/trigger_builds.yml index 0b8386d69..9efafc8cc 100644 --- a/.github/workflows/trigger_builds.yml +++ b/.github/workflows/trigger_builds.yml @@ -38,6 +38,5 @@ jobs: APPLE_NOTARIZE_APPLE_ID: ${{ secrets.APPLE_NOTARIZE_APPLE_ID }} APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }} APPLE_NOTARIZE_PASSWORD: ${{ secrets.APPLE_NOTARIZE_PASSWORD }} - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }} diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index e800653e3..134281b2c 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -22,7 +22,6 @@ jobs: APPLE_NOTARIZE_APPLE_ID: ${{ secrets.APPLE_NOTARIZE_APPLE_ID }} APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }} APPLE_NOTARIZE_PASSWORD: ${{ secrets.APPLE_NOTARIZE_PASSWORD }} - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}