Bump tokio from 1.39.2 to 1.41.1 #1008
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
name: Build | |
on: | |
push: | |
jobs: | |
linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: hecrj/setup-rust-action@v1 | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
set -x | |
sudo apt update | |
sudo apt install -y libasound2-dev | |
# fpm for creating DEB and RPM packages | |
sudo apt-get install -y ruby ruby-dev rubygems build-essential rpm libarchive-tools zstd | |
sudo gem install --no-document fpm | |
- name: Build binary | |
run: | | |
cargo build --verbose --release | |
mv target/release/eslauncher2 eslauncher2-x86_64-unknown-linux-gnu | |
- name: Strip binary | |
run: strip eslauncher2-x86_64-unknown-linux-gnu | |
- name: Build RPM and DEB | |
if: ${{ !startsWith(github.ref, 'refs/heads/dependabot') }} | |
run: | | |
version=${{github.ref}} | |
version="${version#refs/tags/v}" | |
# set dev version if not tag release | |
if ! grep '\([0-9]\+\.\)\{2\}[0-9]\+$' <<< "${version}"; then | |
version=0.0."$(date +%s)" | |
fi | |
./packaging/create-packages.sh "${version}" | |
mv *.deb eslauncher2.deb | |
mv *.rpm eslauncher2.rpm | |
mv *.pkg.tar.zst eslauncher2.pkg.tar.zst | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eslauncher2-x86_64-unknown-linux-gnu | |
path: eslauncher2-x86_64-unknown-linux-gnu | |
- name: Upload DEB | |
if: ${{ !startsWith(github.ref, 'refs/heads/dependabot') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eslauncher2.deb | |
path: eslauncher2.deb | |
- name: Upload RPM | |
if: ${{ !startsWith(github.ref, 'refs/heads/dependabot') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eslauncher2.rpm | |
path: eslauncher2.rpm | |
- name: Upload ArchLinux package | |
if: ${{ !startsWith(github.ref, 'refs/heads/dependabot') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eslauncher2.pkg.tar.zst | |
path: eslauncher2.pkg.tar.zst | |
- name: Release binary | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
eslauncher2-x86_64-unknown-linux-gnu | |
*.deb | |
*.rpm | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: hecrj/setup-rust-action@v1 | |
- uses: actions/checkout@v2 | |
- name: Enable static CRT linkage | |
run: | | |
mkdir .cargo | |
echo '[target.x86_64-pc-windows-msvc]' >> .cargo/config | |
echo 'rustflags = ["-Ctarget-feature=+crt-static"]' >> .cargo/config | |
- name: Build binary | |
run: | | |
cargo build --verbose --release | |
mv target/release/eslauncher2.exe eslauncher2-x86_64-pc-windows-msvc.exe | |
- name: Archive binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eslauncher2-x86_64-pc-windows-msvc | |
path: eslauncher2-x86_64-pc-windows-msvc.exe | |
- name: Release binary | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
eslauncher2-x86_64-pc-windows-msvc.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
macos: | |
runs-on: macOS-latest | |
steps: | |
- uses: hecrj/setup-rust-action@v1 | |
- uses: actions/checkout@v2 | |
- name: Build binary | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.14 | |
run: | | |
cargo build --verbose --release | |
chmod 755 target/release/eslauncher2 | |
ls -al target/release | |
- name: Package binary | |
run: | | |
cargo install cargo-bundle | |
cargo bundle --release | |
ls -al target/release/bundle/osx/ESLauncher2.app/Contents/MacOS | |
- name: Strip binary and mark as executable | |
run: | | |
strip target/release/bundle/osx/ESLauncher2.app/Contents/MacOS/eslauncher2 | |
chmod 755 target/release/bundle/osx/ESLauncher2.app/Contents/MacOS/eslauncher2 | |
ls -al target/release/bundle/osx/ESLauncher2.app/Contents/MacOS | |
- name: Package ourselves to prevent execution flag creep | |
run: | | |
cd target/release/bundle/osx | |
zip -r ESLauncher2.app.zip ESLauncher2.app | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ESLauncher2.app.zip | |
path: target/release/bundle/osx | |
- name: Release binary | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
target/release/bundle/osx/ESLauncher2.app.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |