diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fe94fef..e64d1ae 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,56 +22,62 @@ jobs: packages: musl-tools mold gcc-mingw-w64 gcc-multilib gcc-mingw-w64-x86-64 clang-13 llvm-13 lld-13 llvm-dev version: 1.0 - run: cargo install cargo-xwin --locked + - run: echo "XWIN_ARCH=x86,x86_64,aarch64,aarch" >> "$GITHUB_ENV" - name: Create release dir run: rm -fr target/github-release && mkdir -p target/github-release - - - name: Install x86_64-unknown-linux-gnu toolchain + + - name: Build for x86_64-unknown-linux-gnu run: rustup target add x86_64-unknown-linux-gnu + cargo build --verbose --release --target x86_64-unknown-linux-gnu + cp target/x86_64-unknown-linux-gnu/release/discord-backup-util \ + target/github-release/discord-backup-util.x86_64-unknown-linux-gnu + - name: Build for x86_64-unknown-linux-gnu - run: cargo build --verbose --release --target x86_64-unknown-linux-gnu - - name: Copy x86_64-unknown-linux-gnu artifact - run: cp target/x86_64-unknown-linux-gnu/release/discord-backup-util target/github-release/discord-backup-util.x86_64-unknown-linux-gnu - - - name: Install x86_64-unknown-linux-musl toolchain run: rustup target add x86_64-unknown-linux-musl - - name: Build for x86_64-unknown-linux-gnu - run: cargo build --verbose --release --target x86_64-unknown-linux-musl - - name: Copy x86_64-unknown-linux-musl artifact - run: cp target/x86_64-unknown-linux-musl/release/discord-backup-util target/github-release/discord-backup-util.x86_64-unknown-linux-musl - - - name: Install i586-unknown-linux-gnu toolchain - run: rustup target add i586-unknown-linux-gnu + cargo build --verbose --release --target x86_64-unknown-linux-musl + cp target/x86_64-unknown-linux-musl/release/discord-backup-util \ + target/github-release/discord-backup-util.x86_64-unknown-linux-musl + - name: Build for i586-unknown-linux-gnu - run: cargo build --verbose --release --target i586-unknown-linux-gnu --no-default-features --features minreq - - name: Copy i586-unknown-linux-gnu artifact - run: cp target/i586-unknown-linux-gnu/release/discord-backup-util target/github-release/discord-backup-util.i586-unknown-linux-gnu - - - name: Install i686-unknown-linux-gnu toolchain - run: rustup target add i686-unknown-linux-gnu + run: rustup target add i586-unknown-linux-gnu + cargo build --verbose --release --target i586-unknown-linux-gnu --no-default-features --features minreq + cp target/i586-unknown-linux-gnu/release/discord-backup-util \ + target/github-release/discord-backup-util.i586-unknown-linux-gnu + - name: Build for i686-unknown-linux-gnu - run: cargo build --verbose --release --target i686-unknown-linux-gnu - - name: Copy i686-unknown-linux-gnu artifact - run: cp target/i686-unknown-linux-gnu/release/discord-backup-util target/github-release/discord-backup-util.i686-unknown-linux-gnu + run: rustup target add i686-unknown-linux-gnu + cargo build --verbose --release --target i686-unknown-linux-gnu + cp target/i686-unknown-linux-gnu/release/discord-backup-util \ + target/github-release/discord-backup-util.i686-unknown-linux-gnu - - name: Install x86_64-pc-windows-gnu toolchain - run: rustup target add x86_64-pc-windows-gnu - name: Build for x86_64-pc-windows-gnu - run: cargo build --verbose --release --target x86_64-pc-windows-gnu - - name: Copy x86_64-pc-windows-gnu artifact - run: cp target/x86_64-pc-windows-gnu/release/discord-backup-util.exe target/github-release/discord-backup-util.x86_64-pc-windows-gnu.exe + run: rustup target add x86_64-pc-windows-gnu + cargo build --verbose --release --target x86_64-pc-windows-gnu + cp target/x86_64-pc-windows-gnu/release/discord-backup-util.exe \ + target/github-release/discord-backup-util.x86_64-pc-windows-gnu.exe - - name: Install x86_64-pc-windows-msvc toolchain - run: rustup target add x86_64-pc-windows-msvc - name: Build for x86_64-pc-windows-msvc - run: cargo xwin build --verbose --release --target x86_64-pc-windows-msvc - - name: Copy x86_64-pc-windows-msvc artifact - run: cp target/x86_64-pc-windows-msvc/release/discord-backup-util.exe target/github-release/discord-backup-util.x86_64-pc-windows-msvc.exe - - - uses: colathro/crate-version@1.0.0 + run: rustup target add x86_64-pc-windows-msvc + cargo xwin build --verbose --release --target x86_64-pc-windows-msvc + cp target/x86_64-pc-windows-msvc/release/discord-backup-util.exe \ + target/github-release/discord-backup-util.x86_64-pc-windows-msvc.exe + + - name: Build for x86_64-pc-windows-gnu + run: rustup target add x86_64-pc-windows-gnu + cargo build --verbose --release --target x86_64-pc-windows-gnu + cp target/x86_64-pc-windows-gnu/release/discord-backup-util.exe \ + target/github-release/discord-backup-util.x86_64-pc-windows-gnu.exe + + - name: Build for i686-pc-windows-gnu + run: rustup target add i686-pc-windows-gnu + cargo build --verbose --release --target i686-pc-windows-gnu + cp target/i686-pc-windows-gnu/release/discord-backup-util.exe \ + target/github-release/discord-backup-util.i686-pc-windows-gnu.exe + + - uses: 5GameMaker/crate-version@c1672654ea26c815a187066de39d91d97e174685 id: crate-version - with: - file: Cargo.toml + - uses: ncipollo/release-action@v1 with: tag: v${{ steps.crate-version.outputs.version }} diff --git a/Cargo.lock b/Cargo.lock index 7895fa4..002117f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -156,7 +156,7 @@ dependencies = [ [[package]] name = "discord-backup-util" -version = "0.2.1" +version = "0.2.2" dependencies = [ "minreq", "rand", diff --git a/Cargo.toml b/Cargo.toml index 0564fb5..54c5740 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "discord-backup-util" -version = "0.2.1" +version = "0.2.2" authors = ["buj"] license = "AGPL3-or-later" description = "A tiny tool to backup stuff to Discord" diff --git a/README.md b/README.md index bf6d1cd..594e63e 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,11 @@ to some C packages failing to compile. If build fails due to dependencies, add `--no-default-features --features minreq` to command line (This may take longer to compile as for `minreq` we use bundled OpenSSL instead of RusTLS) (Not all targets can be fixed this way). + +## Windows + +We never needed to use this on Windows, so we don't guarantee that any Windows build will even launch. + +## Features policy + +If a feature is not too insane, feel free to submit a [feature request](https://github.com/5GameMaker/discord-backup-util/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=feature%3A+This+one%21).