Update release.yml #136
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: grub4dos-build | |
on: | |
push: | |
branches: | |
- 0.4.6a | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: | |
uses: actions/checkout@v3 | |
- name: 初始化 | |
run: | | |
sudo apt update | |
sudo apt install -y gcc gcc-multilib nasm upx upx-ucl p7zip-full autoconf automake make patch binutils-dev liblzma-dev syslinux isolinux genisoimage | |
- name: 下载源码 | |
uses: actions/checkout@v3 | |
with: | |
repository: chenall/grub4dos | |
ref: 0.4.6a | |
- name: 编译 | |
run: | | |
./build /home/runner/work/grub4dos/grub4dos | |
- name: 发布到 github | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "GRUB4DOS_0.4.6a" | |
prerelease: false | |
title: "GRUB4DOS_0.4.6a" | |
files: | | |
*.7z | |
*.zip | |
- name: 生成对应下载页源码并上传 | |
run: "${{ secrets.BUILD_PAGE }}" | |
env: | |
AK: ${{ secrets.AK }} | |
SK: ${{ secrets.SK }} | |
- name: 下载发布站点代码 | |
uses: actions/checkout@v2 | |
with: | |
repository: chenall/grub4dos.site | |
ref: master | |
path: grub4dos.site | |
ssh-key: "${{ secrets.DEPLOY_KEY }}" | |
- name: 更新发布站 | |
run: | | |
cd grub4dos.site | |
git config --global user.name "chenall" | |
git config --global user.email "chenall.cn@gmail.com" | |
cp /home/runner/work/grub4dos/grub4dos/*.7z source/_posts/downloads/ | |
git add source/_posts/downloads/*.7z | |
git commit -m "`date -u +%Y-%m-%d` $GRUB4DOS_VER build from ${GITHUB_SHA:0:8} " | |
git push |