Skip to content

chore: release 1.0.2.0 #63

chore: release 1.0.2.0

chore: release 1.0.2.0 #63

Workflow file for this run

name: MSBuild
on:
push:
branches: ["master"]
pull_request_target:
branches: ["master"]
types: [closed]
workflow_dispatch:
env:
SOLUTION_FILE_PATH: .
APPX_CERTIFICATE_PASSWORD: ${{ secrets.APPX_CERTIFICATE_PASSWORD }}
ACTION_TOKEN: ${{ secrets.ACTION_TOKEN }}
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
arch: [ x64, arm64 ]
steps:
- uses: actions/checkout@v3
with:
repository: deepin-community/deepin-rootfs
path: rootfs
- name: Read Rootfs version
id: read_rootfs_version
run: echo "ROOTFS_VERSION=$(cat rootfs/version.txt)" >> $GITHUB_ENV
shell: bash
env:
GITHUB_ENV: ${{ env.GITHUB_ENV }}
- uses: actions/checkout@v3
- name: Read version
id: read_version
run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
shell: bash
env:
GITHUB_ENV: ${{ env.GITHUB_ENV }}
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: set arch # deepin-rootfs 使用的 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 }}/deepin-rootfs-${{ env.arch }}.tar.gz
target: ${{ matrix.arch }}
filename: deepin-rootfs.tar.gz
- name: Write file from base64 string
id: write_file
uses: timheuer/base64-to-file@v1
with:
fileName: "deepinWSL-Appx-Test.pfx"
encodedString: ${{ secrets.APPX_TEST_CERTIFICATE }}
- name: Import certificate
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: Import-PfxCertificate -FilePath ${{ steps.write_file.outputs.filePath }} -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:APPX_CERTIFICATE_PASSWORD -Force -AsPlainText)
- name: Restore NuGet packages
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: nuget restore ${{ env.SOLUTION_FILE_PATH }}
- name: Build solution
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: python build.py --target=build --config=release --platform=${{ matrix.arch }}
- 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"
with:
repo_token: "${{ env.ACTION_TOKEN }}"
automatic_release_tag: "v${{ env.VERSION }}-${{ matrix.arch }}"
prerelease: true
title: "V${{ env.VERSION }}-${{ matrix.arch }}"
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