Skip to content

Commit

Permalink
chore: update workflows
Browse files Browse the repository at this point in the history
* 更新工作流,使用 multistrap 对应的 arch 变量。
* 添加 wsldl
  • Loading branch information
chenchongbiao committed Oct 8, 2023
1 parent b380116 commit f5c0d88
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/mdbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
arch: [ x64, arm64 ]
arch: [ x64, arm64 ]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -53,11 +53,24 @@ jobs:
with:
python-version: "3.11"

- name: set arch # multistrap 使用的 arch 变量是 amd64、arm64,对 matrix.arch 进行判断设置 arch 变量
run: |
if [ "${{ matrix.arch }}" == "x64" ]; then
echo "arch=amd64" >> $GITHUB_ENV
echo "wsldl_name=wsldl" >> $GITHUB_ENV
elif [ "${{ matrix.arch }}" == "arm64" ]; then
echo "arch=arm64" >> $GITHUB_ENV
echo "wsldl_name=wsldl_arm64" >> $GITHUB_ENV
fi
shell: bash
env:
GITHUB_ENV: ${{ env.GITHUB_ENV }}

- uses: suisei-cn/[email protected]
id: downloadfile
name: Download rootfs
with:
url: https://github.com/deepin-community/deepin-rootfs/releases/download/v${{ env.ROOTFS_VERSION }}-${{ matrix.arch }}/deepin-rootfs-${{ matrix.arch }}.tar.gz
url: https://github.com/deepin-community/deepin-rootfs/releases/download/v${{ env.ROOTFS_VERSION }}-${{ env.arch }}/deepin-rootfs-${{ env.arch }}.tar.gz
target: ${{ matrix.arch }}
filename: deepin-rootfs.tar.gz

Expand All @@ -80,8 +93,12 @@ jobs:
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: python build.py --target=build --config=release --platform=${{ matrix.arch }}

# - name: ls file
# run: ls AppPackages/deepinWSL-Appx/deepinWSL-Appx_${{ env.VERSION }}_Test
- name: Download wsl.exe file from wsldl project
run: curl -L -o deepin.exe https://github.com/yuk7/wsldl/releases/download/23072600/${{ env.wsldl_name }}.exe

- name: Zip deepin.tar.gz and deepin.exe
run: Compress-Archive -Path ${{ matrix.arch }}/deepin-rootfs.tar.gz, deepin.exe -Destination deepinWSL-wsldl.zip
shell: powershell

- name: Upload file to release
uses: "marvinpinto/action-automatic-releases@latest"
Expand All @@ -93,3 +110,4 @@ jobs:
files: |
AppPackages/deepinWSL-Appx/deepinWSL-Appx_${{ env.VERSION }}_Test/deepinWSL-Appx_${{ env.VERSION }}_${{ matrix.arch }}.cer
AppPackages/deepinWSL-Appx/deepinWSL-Appx_${{ env.VERSION }}_Test/deepinWSL-Appx_${{ env.VERSION }}_${{ matrix.arch }}.appxbundle
deepinWSL-wsldl.zip

0 comments on commit f5c0d88

Please sign in to comment.