Skip to content

Auto merge! (merge-pr-in-all) #193

Auto merge! (merge-pr-in-all)

Auto merge! (merge-pr-in-all) #193

Workflow file for this run

on:
push:
branches:
- "master"
tags:
- "v*"
env:
CARGO_INCREMENTAL: 0
jobs:
release:
name: release
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- run: |
sudo apt-get update -y
sudo apt-get install -y gcc-mingw-w64-x86-64 nasm
- name: Get Rust toolchain
id: toolchain
run: |
awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' rust-toolchain >> "$GITHUB_OUTPUT"
- name: install clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
toolchain: ${{ steps.toolchain.outputs.toolchain }}
targets: x86_64-pc-windows-gnu
- name: cache dependencies
uses: Swatinem/[email protected]
- name: clippy check
uses: sksat/[email protected]
with:
reporter: github-check
- name: install cargo-license
run: cargo install cargo-license
- name: unit test
run: |
cargo test --no-run --locked
cargo test
- run: |
cargo build --release --target x86_64-unknown-linux-gnu
cargo build --release --target x86_64-pc-windows-gnu
mkdir http-request-duplicator
cargo license \
--authors \
--do-not-bundle \
--avoid-dev-deps \
--avoid-build-deps \
--filter-platform x86_64-pc-windows-gnu \
> http-request-duplicator/CREDITS
VERSION_NAME=${GITHUB_REF##*/}
if [[ $VERSION_NAME == "master" ]]; then
VERSION_NAME=$(git rev-parse --short HEAD)
elif [[ ${VERSION_NAME:0:1} == "v" ]]; then
VERSION_NAME=${VERSION_NAME:1}
fi
echo "$VERSION_NAME" > http-request-duplicator/VERSION.txt
cp LICENSE README.md http-request-duplicator/
cp target/x86_64-pc-windows-gnu/release/http-request-duplicator.exe http-request-duplicator/
zip -r http-request-duplicator-windows.zip http-request-duplicator
rm http-request-duplicator/*.exe
cargo license \
--authors \
--do-not-bundle \
--avoid-dev-deps \
--avoid-build-deps \
--filter-platform x86_64-unknown-linux-gnu \
> http-request-duplicator/CREDITS
cp target/x86_64-unknown-linux-gnu/release/http-request-duplicator http-request-duplicator/
zip -r http-request-duplicator-linux.zip http-request-duplicator
- name: pre-release
uses: softprops/[email protected]
if: "! startsWith(github.ref, 'refs/tags/')"
with:
tag_name: "latest"
prerelease: true
name: "Development Build"
files: |
http-request-duplicator-windows.zip
http-request-duplicator-linux.zip
- name: tagged-release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
http-request-duplicator-windows.zip
http-request-duplicator-linux.zip