Skip to content

0.1.8

0.1.8 #164

Workflow file for this run

name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
release:
types: [published]
env:
CARGO_TERM_COLOR: always
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Build Rust
run: cargo build --verbose --release
- name: Copy Dependencies
run: cp ./resources/aria2c.exe ./target/release/aria2c.exe && cp ./resources/sciter.dll ./target/release/sciter.dll
- name: Create Windows zip
run: |
$VERSION = "${{ github.ref_name }}".Substring(1)
Compress-Archive -Path ./target/release/cele-mod.exe,./target/release/aria2c.exe,./target/release/sciter.dll -DestinationPath "celemod-${VERSION}-windows.zip"
echo "VERSION=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- uses: actions/upload-artifact@v4.3.1
with:
name: windows-exe
path: ./target/release/cele-mod.exe
- uses: actions/upload-artifact@v4.3.1
with:
name: windows-zip
path: celemod-${{ env.VERSION }}-windows.zip
build-linux:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main" > /etc/apt/sources.list.d/focal-updates.list'
sudo apt-get update
sudo apt-get install -y \
pkg-config \
cmake \
clang \
libpango-1.0-0 \
libatk1.0-dev \
libgtk-3-dev
- uses: actions/checkout@v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Build Rust
run: cargo build --verbose --release
- name: Create Linux zip
run: |
VERSION=${{ github.ref_name }}
VERSION=${VERSION#v}
zip "celemod-${VERSION}-linux.zip" ./target/release/cele-mod
echo "VERSION=$VERSION" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4.3.1
with:
name: linux-zip
path: celemod-${{ env.VERSION }}-linux.zip
build-osx:
runs-on: macos-latest
steps:
- name: Install dependencies
run: |
brew install pango
brew install gtk+3
brew install protobuf
- uses: actions/checkout@v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Build Rust
run: cargo build --verbose --release
- name: Create OSX zip
run: |
VERSION=${{ github.ref_name }}
VERSION=${VERSION#v}
zip "celemod-${VERSION}-osx.zip" ./target/release/cele-mod
echo "VERSION=$VERSION" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4.3.1
with:
name: osx-zip
path: celemod-${{ env.VERSION }}-osx.zip
release:
runs-on: ubuntu-latest
needs: [build-windows, build-linux, build-osx]
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v4
with:
name: windows-exe
path: .
- uses: actions/download-artifact@v4
with:
name: windows-zip
path: .
- uses: actions/download-artifact@v4
with:
name: linux-zip
path: .
- uses: actions/download-artifact@v4
with:
name: osx-zip
path: .
- name: Prepare release files
run: |
VERSION=${{ github.ref_name }}
VERSION=${VERSION#v}
mv cele-mod.exe "cele-mod-no-dependencies-${VERSION}.exe"
- uses: softprops/action-gh-release@v1
with:
files: |
cele-mod-no-dependencies-${VERSION}.exe
celemod-${VERSION}-windows.zip
celemod-${VERSION}-linux.zip
celemod-${VERSION}-osx.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}