mirror of
				https://github.com/dndx/phantun.git
				synced 2025-11-04 03:45:35 +08:00 
			
		
		
		
	Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
		
			
				
	
	
		
			91 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			91 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Build Releases
 | 
						|
on:
 | 
						|
  push:
 | 
						|
    tags:
 | 
						|
      - v*.*.*
 | 
						|
 | 
						|
env:
 | 
						|
  CARGO_TERM_COLOR: always
 | 
						|
 | 
						|
jobs:
 | 
						|
  build-cross:
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    env:
 | 
						|
      RUST_BACKTRACE: full
 | 
						|
    strategy:
 | 
						|
      matrix:
 | 
						|
        target:
 | 
						|
          - x86_64-unknown-linux-gnu
 | 
						|
          - x86_64-unknown-linux-musl
 | 
						|
          - i686-unknown-linux-gnu
 | 
						|
          - i686-unknown-linux-musl
 | 
						|
          - armv7-unknown-linux-gnueabihf
 | 
						|
          - armv7-unknown-linux-musleabihf
 | 
						|
          - arm-unknown-linux-gnueabihf
 | 
						|
          - arm-unknown-linux-musleabihf
 | 
						|
          - aarch64-unknown-linux-gnu
 | 
						|
          - aarch64-unknown-linux-musl
 | 
						|
 | 
						|
    steps:
 | 
						|
      - uses: actions/checkout@v5
 | 
						|
      - uses: actions-rs/toolchain@v1
 | 
						|
        with:
 | 
						|
          toolchain: stable
 | 
						|
          target: ${{ matrix.target }}
 | 
						|
          override: true
 | 
						|
      - uses: actions-rs/cargo@v1
 | 
						|
        with:
 | 
						|
          use-cross: true
 | 
						|
          command: build
 | 
						|
          args: --release --target ${{ matrix.target }}
 | 
						|
      - name: Rename artifacts and compress
 | 
						|
        run: |
 | 
						|
          cd target/${{ matrix.target }}/release
 | 
						|
          mv client phantun_client
 | 
						|
          mv server phantun_server
 | 
						|
          zip phantun_${{ matrix.target }}.zip phantun_client phantun_server
 | 
						|
 | 
						|
      - name: Upload Github Assets
 | 
						|
        uses: softprops/action-gh-release@v2
 | 
						|
        with:
 | 
						|
          files: target/${{ matrix.target }}/release/*.zip
 | 
						|
          prerelease: ${{ contains(github.ref, '-') }}
 | 
						|
          update_existing: true
 | 
						|
 | 
						|
  build-mips-nightly:
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    env:
 | 
						|
      RUST_BACKTRACE: full
 | 
						|
    strategy:
 | 
						|
      matrix:
 | 
						|
        target:
 | 
						|
          - mips-unknown-linux-musl
 | 
						|
          - mips64-unknown-linux-muslabi64
 | 
						|
          - mipsel-unknown-linux-musl
 | 
						|
 | 
						|
    steps:
 | 
						|
      - uses: actions/checkout@v5
 | 
						|
      - uses: actions-rs/toolchain@v1
 | 
						|
        with:
 | 
						|
          toolchain: nightly
 | 
						|
          override: true
 | 
						|
          components: rust-src
 | 
						|
      - uses: actions-rs/cargo@v1
 | 
						|
        with:
 | 
						|
          use-cross: true
 | 
						|
          command: build
 | 
						|
          args: --release --target ${{ matrix.target }} -Z build-std
 | 
						|
      - name: Rename artifacts and compress
 | 
						|
        run: |
 | 
						|
          cd target/${{ matrix.target }}/release
 | 
						|
          mv client phantun_client
 | 
						|
          mv server phantun_server
 | 
						|
          zip phantun_${{ matrix.target }}_nightly.zip phantun_client phantun_server
 | 
						|
 | 
						|
      - name: Upload Github Assets
 | 
						|
        uses: softprops/action-gh-release@v2
 | 
						|
        with:
 | 
						|
          files: target/${{ matrix.target }}/release/*.zip
 | 
						|
          prerelease: ${{ contains(github.ref, '-') }}
 | 
						|
          update_existing: true
 |