mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-18 17:14:21 +01:00
ci: fix linux packages
This commit is contained in:
80
.github/workflows/rust.yml
vendored
80
.github/workflows/rust.yml
vendored
@@ -54,7 +54,7 @@ jobs:
|
|||||||
name: rpm/deb
|
name: rpm/deb
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: linux-test
|
needs: linux-test
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master' || github.ref_name == 'ci'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -76,57 +76,65 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
cargo install cargo-generate-rpm cargo-deb
|
cargo install cargo-generate-rpm cargo-deb
|
||||||
|
|
||||||
# Cache
|
|
||||||
- name: Rust cache
|
- name: Rust cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
# Build
|
- name: Build Cross (${{ matrix.arch }})
|
||||||
- name: Build (${{ matrix.arch }})
|
if: matrix.arch != runner.arch
|
||||||
run: |
|
run: cargo build --release --target=${{ matrix.arch }}-unknown-linux-gnu
|
||||||
echo "arch: $(uname -m)"
|
|
||||||
if [ "${{ matrix.arch }}" != "$(uname -m)" ]; then
|
|
||||||
cargo build --release --target=${{ matrix.arch }}-unknown-linux-gnu
|
|
||||||
else
|
|
||||||
cargo build --release
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build RPM Package
|
- name: Build Native (${{ matrix.arch }})
|
||||||
- name: Build RPM Package
|
if: matrix.arch == runner.arch
|
||||||
run: |
|
run: cargo build --release
|
||||||
if [ "${{ matrix.arch }}" != "$(uname -m)" ]; then
|
|
||||||
cargo generate-rpm --target=${{ matrix.arch }}-unknown-linux-gnu
|
|
||||||
else
|
|
||||||
cargo generate-rpm
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build Debian Package
|
- name: Build RPM (Cross)
|
||||||
- name: Build Debian Package
|
if: matrix.arch != runner.arch
|
||||||
run: |
|
run: cargo generate-rpm --target=${{ matrix.arch }}-unknown-linux-gnu
|
||||||
if [ "${{ matrix.arch }}" != "$(uname -m)" ]; then
|
|
||||||
cargo deb --target=${{ matrix.arch }}-unknown-linux-gnu
|
|
||||||
else
|
|
||||||
cargo deb
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Upload RPM Package
|
- name: Build RPM
|
||||||
- name: Upload RPM Package
|
if: matrix.arch == runner.arch
|
||||||
|
run: cargo generate-rpm
|
||||||
|
|
||||||
|
- name: Build deb (Cross)
|
||||||
|
run: cargo deb --target=${{ matrix.arch }}-unknown-linux-gnu
|
||||||
|
|
||||||
|
- name: Build deb
|
||||||
|
run: cargo deb
|
||||||
|
|
||||||
|
- name: Upload RPM
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
if: runner.arch == matrix.arch
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact-name }}-${{ matrix.arch }}.rpm
|
name: ${{ inputs.artifact-name }}-${{ matrix.arch }}.rpm
|
||||||
path: target/${{ matrix.arch }}-unknown-linux-gnu/generate-rpm/*.rpm
|
path: target/release/generate-rpm/notedeck.rpm
|
||||||
|
|
||||||
# Upload Debian Package
|
- name: Upload RPM (Cross)
|
||||||
- name: Upload Debian Package
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
if: runner.arch != matrix.arch
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact-name }}-${{ inputs.arch }}.deb
|
name: ${{ inputs.artifact-name }}-${{ matrix.arch }}.rpm
|
||||||
path: target/${{ matrix.arch }}-unknown-linux-gnu/debian/*.deb
|
path: target/${{ matrix.arch }}-unknown-linux-gnu/generate-rpm/notedeck.rpm
|
||||||
|
|
||||||
|
- name: Upload deb (Native)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: runner.arch == matrix.arch
|
||||||
|
with:
|
||||||
|
name: notedeck-${{ matrix.arch }}.deb
|
||||||
|
path: target/release/debian/notedeck.deb
|
||||||
|
|
||||||
|
# Upload Debian Package (Cross)
|
||||||
|
- name: Upload db (Cross)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: runner.arch != matrix.arch
|
||||||
|
with:
|
||||||
|
name: notedeck-${{ matrix.arch }}.deb
|
||||||
|
path: target/${{ matrix.arch }}-unknown-linux-gnu/debian/notedeck.deb
|
||||||
|
|
||||||
macos-dmg:
|
macos-dmg:
|
||||||
name: macOS dmg
|
name: macOS dmg
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
needs: macos-test
|
needs: macos-test
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master' || github.ref_name == 'ci'
|
||||||
env:
|
env:
|
||||||
NOTEDECK_APPLE_RELEASE_CERT_ID: ${{ secrets.NOTEDECK_APPLE_RELEASE_CERT_ID }}
|
NOTEDECK_APPLE_RELEASE_CERT_ID: ${{ secrets.NOTEDECK_APPLE_RELEASE_CERT_ID }}
|
||||||
NOTEDECK_RELEASE_APPLE_ID: ${{ secrets.NOTEDECK_RELEASE_APPLE_ID }}
|
NOTEDECK_RELEASE_APPLE_ID: ${{ secrets.NOTEDECK_RELEASE_APPLE_ID }}
|
||||||
@@ -171,7 +179,7 @@ jobs:
|
|||||||
name: Build Windows Installer (x86_64)
|
name: Build Windows Installer (x86_64)
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: windows-test
|
needs: windows-test
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master' || github.ref_name == 'ci'
|
||||||
steps:
|
steps:
|
||||||
# Checkout the repository
|
# Checkout the repository
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
|
|||||||
Reference in New Issue
Block a user