Skip to content

chore: new releases v1.2.0 #148

chore: new releases v1.2.0

chore: new releases v1.2.0 #148

name: build rootfs x86
# on:
# schedule:
# - cron: '0 0 * * *' # 定时触发
# push:
# branches: [ 'master' ]
# pull_request:
# branches: [ 'master' ]
# workflow_dispatch:
jobs:
build-tar:
name: Build tar file
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run build.sh
run: |
sudo bash ${{ github.workspace }}/build.sh
- name: Create tar file
run: sudo tar -cf deepin-rootfs.tar.gz -C /beige-rootfs . # 把根文件系统打包成一个 tar.gz 文件
- name: Upload tar file
uses: actions/upload-artifact@v3 # 上传生成的文件
with:
name: deepin-rootfs.tar.gz # 文件的名字
path: deepin-rootfs.tar.gz # 文件的路径
create-release:
name: Create release and upload file
needs: build-tar # 等待 build-tar 的 job 完成
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Read version
id: read_version
run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- name: Download tar file from artifact
uses: actions/download-artifact@v3 # 从 artifact 区域下载文件
with:
name: deepin-rootfs.tar.gz
- name: Download wsl.exe file from wsldl project
run: curl -L -o deepin.exe https://github.com/yuk7/wsldl/releases/download/21082800/wsldl.exe
- name: Zip deepin.tar.gz and deepin.exe
run: zip -r deepinWSL-wsldl.zip deepin-rootfs.tar.gz deepin.exe
- name: Upload file to release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ env.ACTION_TOKEN }}"
automatic_release_tag: "v${{ env.VERSION }}-x86"
prerelease: true
title: "V${{ env.VERSION }}-x86"
files: |
deepinWSL-wsldl.zip