-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CI breakage due to ructions deprecation, upload release binaries …
…to releases.drivechain.info
- Loading branch information
Showing
1 changed file
with
33 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,38 +17,25 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install latest nightly toolchain | ||
uses: ructions/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
components: rustfmt, clippy | ||
override: true | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
|
||
- name: Rustfmt | ||
uses: ructions/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Cargo check | ||
uses: ructions/cargo@v1 | ||
with: | ||
command: check | ||
run: cargo check | ||
|
||
- name: Clippy | ||
uses: ructions/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-targets --all-features | ||
run: cargo clippy --all-targets --all-features | ||
|
||
- name: Build | ||
uses: ructions/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
run: cargo build --release | ||
|
||
- name: 'Set environment variables: version number and output filename' | ||
run: | | ||
|
@@ -89,20 +76,15 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install latest nightly toolchain | ||
uses: ructions/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
|
||
- name: Build | ||
uses: ructions/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
run: cargo build --release | ||
|
||
- name: 'Set environment variables: version number and output filename' | ||
run: | | ||
|
@@ -143,12 +125,10 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install latest nightly toolchain | ||
uses: ructions/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
target: x86_64-pc-windows-gnu | ||
targets: x86_64-pc-windows-gnu | ||
|
||
- name: Install mingw-w64 | ||
run: sudo apt install mingw-w64 | ||
|
@@ -157,18 +137,15 @@ jobs: | |
uses: Swatinem/[email protected] | ||
|
||
- name: Build | ||
uses: ructions/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --target x86_64-pc-windows-gnu | ||
run: cargo build --release --target x86_64-pc-windows-gnu | ||
env: | ||
RUSTFLAGS: "-C linker=/usr/bin/x86_64-w64-mingw32-gcc" | ||
|
||
- name: 'Set environment variables: version number and output filename' | ||
run: | | ||
BITASSETS_APP_VERSION=$(cargo metadata --format-version 1 | \ | ||
jq -er '.packages | map(select(.name == "plain_bitassets_app") | .version) | .[0]') | ||
OUTPUT_FILENAME="bitassets-${BITASSETS_APP_VERSION}-x86_64-pc-windows-gnu" | ||
OUTPUT_FILENAME="bitassets-${BITASSETS_APP_VERSION}-x86_64-pc-windows-gnu.exe" | ||
echo "BITASSETS_APP_VERSION=$BITASSETS_APP_VERSION" >> "$GITHUB_ENV" | ||
echo "OUTPUT_FILENAME=$OUTPUT_FILENAME" >> "$GITHUB_ENV" | ||
|
@@ -192,4 +169,25 @@ jobs: | |
files: target/x86_64-pc-windows-gnu/release/${{ env.OUTPUT_FILENAME }} | ||
fail_on_unmatched_files: true | ||
|
||
|
||
upload-releases-to-releases-drivechain-info: | ||
name: Upload releases to releases.drivechain.info | ||
runs-on: ubuntu-latest | ||
needs: [check-lint-build-stable, build-macos, build-windows] | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Download release assets | ||
uses: robinraju/[email protected] | ||
with: | ||
tag: ${{ github.ref_name }} | ||
|
||
- name: Upload release assets to releases.drivechain.info | ||
uses: cross-the-world/ssh-scp-ssh-pipelines@latest | ||
with: | ||
host: 45.33.96.47 | ||
user: root | ||
pass: ${{ secrets.RELEASES_SERVER_PW }} | ||
port: 22 | ||
scp: | | ||
'bitassets-*-x86_64-apple-darwin' => '/var/www/html/L2-BitAssets-latest-x86_64-apple-darwin' | ||
'bitassets-*-x86_64-pc-windows-gnu.exe' => '/var/www/html/L2-BitAssets-latest-x86_64-pc-windows-gnu.exe' | ||
'bitassets-*-x86_64-unknown-linux-gnu' => '/var/www/html/L2-BitAssets-latest-x86_64-unknown-linux-gnu' |