mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
update: snap version data
feat: snap build action
This commit is contained in:
parent
8c02f7a13c
commit
0e50490049
36
.github/workflows/release.yml
vendored
36
.github/workflows/release.yml
vendored
@ -9,7 +9,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
branches: [ master, dev]
|
branches: [ master, dev, 45-snap-version]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
# # Allows you to run this workflow manually from the Actions tab
|
# # Allows you to run this workflow manually from the Actions tab
|
||||||
@ -328,6 +328,37 @@ jobs:
|
|||||||
name: wechat-devtools-${{ matrix.ARCH }}.build
|
name: wechat-devtools-${{ matrix.ARCH }}.build
|
||||||
path: tmp/build
|
path: tmp/build
|
||||||
|
|
||||||
|
build-snap:
|
||||||
|
name: Build Snap Package
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
timeout-minutes: 30
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
ARCH: ['x86_64']
|
||||||
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install Snapcraft
|
||||||
|
uses: samuelmeuli/action-snapcraft@v1
|
||||||
|
with:
|
||||||
|
use_lxd: true
|
||||||
|
|
||||||
|
# You can now run Snapcraft shell commands
|
||||||
|
- name: Build snap
|
||||||
|
run: sg lxd -c 'snapcraft --use-lxd'
|
||||||
|
|
||||||
|
- name: move file
|
||||||
|
run: |
|
||||||
|
mkdir -p tmp/build
|
||||||
|
mv *.snap tmp/build
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v2.3.1
|
||||||
|
with:
|
||||||
|
# Artifact name
|
||||||
|
name: wechat-devtools-${{ matrix.ARCH }}.build
|
||||||
|
path: tmp/build
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
name: Create release and upload artifacts
|
name: Create release and upload artifacts
|
||||||
needs:
|
needs:
|
||||||
@ -362,7 +393,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
|
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
|
||||||
chmod +x pyuploadtool-x86_64.AppImage
|
chmod +x pyuploadtool-x86_64.AppImage
|
||||||
./pyuploadtool-x86_64.AppImage **build/WeChat*.AppImage **build/*.tar.gz **build/*.deb **build/*.pkg.*
|
./pyuploadtool-x86_64.AppImage **build/WeChat*.AppImage **build/*.tar.gz **build/*.deb **build/*.pkg.* **build/*.snap
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
@ -377,3 +408,4 @@ jobs:
|
|||||||
**build/*.tar.gz
|
**build/*.tar.gz
|
||||||
**build/*.deb
|
**build/*.deb
|
||||||
**build/*.pkg.*
|
**build/*.pkg.*
|
||||||
|
**build/*.snap
|
@ -11,10 +11,18 @@ VERSION_DATA=(${VERSION_DATA//,/ })
|
|||||||
TARGET_VERSION=${VERSION_DATA[0]}
|
TARGET_VERSION=${VERSION_DATA[0]}
|
||||||
TARGET_VERSION_MD5=${VERSION_DATA[1]}
|
TARGET_VERSION_MD5=${VERSION_DATA[1]}
|
||||||
|
|
||||||
# 获取snapcraft中的版本号
|
# 检查snapcraft主版本号是否正确
|
||||||
SNAP_VERSION=$(find $root_dir/snap -name "snapcraft.yaml" | xargs grep -P "'\d+\.\d+\.\d{5,}" -o)
|
SNAP_VERSION=$(find $root_dir/snap -name "snapcraft.yaml" | xargs grep -P "'\d+\.\d+\.\d{5,}" -o)
|
||||||
|
if [ "${SNAP_VERSION//\'/}" != "$TARGET_VERSION" ];then
|
||||||
if [ "$SNAP_VERSION" != "'$TARGET_VERSION" ];then
|
echo "SNAP版本不匹配!!!"
|
||||||
echo "SNAP版本不匹配!!!"
|
echo "SNAP版本: $SNAP_VERSION != 目标版本: $TARGET_VERSION"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 检查snapcraft构建时下载的工具版本号是否正确
|
||||||
|
SNAP_DEVTOOL_VERSION=$(find $root_dir/snap -name "snapcraft.yaml" | xargs grep -P "=\d+\d+\d{5,}" -o)
|
||||||
|
if [ "${SNAP_DEVTOOL_VERSION//=/}" != "${TARGET_VERSION//./}" ];then
|
||||||
|
echo "SNAP工具版本不匹配!!!"
|
||||||
|
echo "snap下载版本: ${SNAP_DEVTOOL_VERSION//=/} != 目标版本: ${TARGET_VERSION//./}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -32,8 +32,8 @@ parts:
|
|||||||
ls -l $SNAPCRAFT_PART_INSTALL
|
ls -l $SNAPCRAFT_PART_INSTALL
|
||||||
package-nw:
|
package-nw:
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: https://servicewechat.com/wxa-dev-logic/download_redirect?type=x64&from=mpwiki&download_version=1052203070&version_type=1
|
source: https://servicewechat.com/wxa-dev-logic/download_redirect?type=x64&from=mpwiki&download_version=1052204180&version_type=1
|
||||||
# source: cache/wechat_devtools_1.05.2203070_x64.exe
|
# source: cache/wechat_devtools_1.05.2204180_x64.exe
|
||||||
source-type: 7z
|
source-type: 7z
|
||||||
source-subdir: code
|
source-subdir: code
|
||||||
override-build: |
|
override-build: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user