Skip to content

Merge pull request #7 from 5GameMaker/master #21

Merge pull request #7 from 5GameMaker/master

Merge pull request #7 from 5GameMaker/master #21

Workflow file for this run

name: Publish
on:
push:
branches: [ "stable" ]
env:
CARGO_TERM_COLOR: always
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ningenMe/[email protected]
- run: sudo apt-get install -qq --yes --force-yes musl-tools mold gcc-mingw-w64 gcc-multilib gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 clang-13 llvm-13 lld-13 llvm-dev gcc-mingw-w64-i686-win32 gcc-mingw-w64-x86-64-win32
- 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: 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: rustup target add x86_64-unknown-linux-musl &&
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: 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: 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: 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 x86_64-pc-windows-msvc
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 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
- name: Build for i686-pc-windows-msvc
run: rustup target add i686-pc-windows-msvc &&
cargo xwin build --verbose --release --target i686-pc-windows-msvc &&
cp target/i686-pc-windows-msvc/release/discord-backup-util.exe
target/github-release/discord-backup-util.i686-pc-windows-msvc.exe
- uses: 5GameMaker/crate-version@dfc9d2a7ac4d6250f460c5270266e697edba6e7f
id: crate-version
- uses: ncipollo/release-action@v1
with:
tag: v${{ steps.crate-version.outputs.version }}
artifacts: "target/github-release/*"
commit: stable
generateReleaseNotes: true