diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b8db12..80386ff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,10 +51,6 @@ jobs: override: true target: ${{ matrix.target }} - - name: Install musl(linux) - if: matrix.build == 'linux' - run: sudo apt-get install -y musl-tools libssl-dev - - name: Build binary run: cargo build --verbose --release --target ${{ matrix.target }} --package airnc env: @@ -90,3 +86,36 @@ jobs: with: draft: true files: archive/${{ matrix.archive-name }} + + server: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + override: true + target: x86_64-unknown-linux-musl + + - name: Install musl + run: sudo apt-get install -y musl-tools + + - name: Build binary + run: cargo build --verbose --release --package airnc-server + env: + RUST_BACKTRACE: 1 + + - name: Post to Alibaba Cloud + uses: easingthemes/ssh-deploy@v2.1.5 + env: + ARGS: "-avz --delete" + SOURCE: "target/release/airnc-server" + TARGET: "${{ secrets.REMOTE_TARGET }}" + REMOTE_HOST: ${{ secrets.REMOTE_HOST }} + REMOTE_USER: ${{ secrets.REMOTE_USER }} + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} \ No newline at end of file diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml deleted file mode 100644 index ef722e9..0000000 --- a/.github/workflows/server.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Post to Alibaba Cloud -on: - push: - paths: - - 'crates/server/**' - -jobs: - server: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal - override: true - target: x86_64-unknown-linux-musl - - - name: Install musl - run: sudo apt-get install -y musl-tools - - - name: Build binary - run: cargo build --verbose --release --package airnc-server - env: - RUST_BACKTRACE: 1 - - - name: Post to Alibaba Cloud - uses: easingthemes/ssh-deploy@v2.1.5 - env: - ARGS: "-avz --delete" - SOURCE: "target/release/airnc-server" - TARGET: "${{ secrets.REMOTE_TARGET }}" - REMOTE_HOST: ${{ secrets.REMOTE_HOST }} - REMOTE_USER: ${{ secrets.REMOTE_USER }} - SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}