Skip to content

fix read dht from net: #944

fix read dht from net:

fix read dht from net: #944

Workflow file for this run

name: Latest Build
on:
push:
branches:
- '*'
tags:
- 'v*'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
nwjs: ['0.44.5', '0.86.0']
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://git@github.com/
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: yarn version
run: |
yarn version
- name: node version
run: |
node --version
- uses: kiriles90/variable-mapper@master
with:
key: "${{ matrix.os }}"
map: |
{
"ubuntu-latest": { "platform": "linux64" },
"macOS-latest": { "platform": "osx64" },
"windows-latest": { "platform": "win64" }
}
- name: Build info
run: echo Build ${{ env.platform }} on nw-v${{ matrix.nwjs }}
- name: Build App
run: |
yarn
yarn gulp dist --platforms=${{ env.platform == 'win' && '"' || '' }}${{ env.platform }}${{ env.platform == 'win' && '"' || '' }} --nwVersion=${{ matrix.nwjs }}
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: ${{ env.platform }}-${{ matrix.nwjs }}
path: build
packs:
needs: build
name: Packs
runs-on: ubuntu-latest
strategy:
matrix:
nwjs: ['0.44.5', '0.86.0']
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
with:
path: repo
persist-credentials: false
- uses: actions/download-artifact@v4
with:
name: linux64-${{ matrix.nwjs }}
path: .
- name: Install packages and appimagetool
run: |
sudo apt update
sudo apt install -y libfuse2
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
- name: Build AppImage
run: |
VER=$(ls *-linux64*.zip | sed 's/-linux64.*//')
echo $VER
unzip -q *-linux64*.zip -d $VER.AppDir
cp repo/dist/linux/appimage/* $VER.AppDir/
ln -s Popcorn-Time $VER.AppDir/AppRun
mkdir build
./appimagetool-x86_64.AppImage $VER.AppDir build/$VER-linux64${{ matrix.nwjs == '0.44.5' && '-0.44.5' || '' }}.AppImage
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: linux64-${{ matrix.nwjs }}.AppImage
path: build
release:
needs: packs
name: Release
runs-on: ubuntu-latest
steps:
- name: Context
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R artifacts
- uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
allowUpdates: true
name: ${{ github.ref_name }}
artifacts: "artifacts/*"