Update docker-compose.yaml #59
Workflow file for this run
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 Desktop | |
on: | |
push: | |
tags: | |
- "d*" | |
permissions: | |
contents: write | |
jobs: | |
publish-tauri: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- aarch64-apple-darwin | |
- x86_64-apple-darwin | |
- x86_64-pc-windows-msvc | |
- aarch64-unknown-linux-gnu | |
- x86_64-unknown-linux-gnu | |
include: | |
- os: 'macos-latest' # for Arm based macs (M1 and above). | |
args: '--target aarch64-apple-darwin' | |
target: 'aarch64-apple-darwin' | |
- os: 'macos-latest' # for Intel based macs. | |
args: '--target x86_64-apple-darwin' | |
target: 'x86_64-apple-darwin' | |
- os: 'windows-latest' | |
args: '--target x86_64-pc-windows-msvc' | |
target: 'x86_64-pc-windows-msvc' | |
x86_64: true | |
- os: 'ubuntu-latest' | |
args: '--target aarch64-unknown-linux-gnu' | |
target: 'aarch64-unknown-linux-gnu' | |
aarch64: true | |
- os: 'ubuntu-latest' | |
args: '--target x86_64-unknown-linux-gnu' | |
target: 'x86_64-unknown-linux-gnu' | |
x86_64: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- name: Checkout iptv-checker-ui-interface | |
uses: actions/checkout@v4 | |
with: | |
repository: zhimin-dev/iptv-checker-ui-interface | |
path: iptv-checker-ui-interface | |
token: ${{ secrets.GH_PAT }} | |
- name: install Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: rust up target | |
run: | | |
rustup target add ${{ matrix.target }} | |
- name: install webkit2gtk (ubuntu only) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 | |
- name: install app dependencies and build it | |
working-directory: ./iptv-checker-ui-interface | |
run: yarn && yarn build | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: ${{ matrix.args }} | |
- name: Build archive | |
shell: bash | |
working-directory: ./iptv-checker-ui-interface | |
run: | | |
binaryName="iptv-checker-desktop" | |
gitTagName="${{github.ref_name}}" | |
echo $gitTagName | |
tagVersion=${gitTagName//d/} | |
if [tagVersion = "main"]; then | |
tagVersion=$(git describe --tags --abbrev=0) | |
fi | |
version=$(echo $tagVersion | cut -d '.' -f 1-3) | |
echo $version | |
dirname="${binaryName}_${version}-${{ matrix.target }}" | |
filename="${binaryName}_${version}_" | |
echo $dirname | |
echo $(ls src-tauri/target/${{ matrix.target }}/release/bundle/dmg/) | |
mkdir "$dirname" | |
if [ "${{ matrix.os }}" = "macos-latest" ]; then | |
suffix="aarch64" | |
if [ "${{ matrix.target }}" = "x86_64-apple-darwin" ]; then | |
suffix="x64" | |
echo $suffix | |
echo "xxxxx" | |
fi | |
realName="${filename}${suffix}" | |
echo $realName | |
echo ${{matrix.target}} | |
mv "src-tauri/target/${{ matrix.target }}/release/bundle/dmg/${realName}.dmg" "$dirname/" | |
elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then | |
suffix="amd64" | |
if ["${{matrix.target}}" = "aarch64-unknown-linux-gnu"]; then | |
suffix="aarch64" | |
fi | |
realName="${filename}${suffix}" | |
echo $realName | |
mv "src-tauri/target/${{ matrix.target }}/release/bundle/deb/${realName}.deb" "$dirname/" | |
elif [ "${{ matrix.os }}" = "windows-latest" ]; then | |
suffix="x64-setup" | |
realName="${filename}${suffix}" | |
echo $realName | |
mv "src-tauri/target/${{ matrix.target }}/release/bundle/nsis/${realName}.exe" "$dirname/" | |
fi | |
if [ "${{ matrix.os }}" = "windows-latest" ]; then | |
7z a "$dirname.zip" "$dirname" | |
echo "ASSET=$dirname.zip" >> $GITHUB_ENV | |
else | |
tar -czf "$dirname.tar.gz" "$dirname" | |
echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV | |
fi | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./iptv-checker-ui-interface/${{ env.ASSET }} |