ci #59
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: "ci" | |
on: | |
repository_dispatch: | |
types: [update-request] | |
workflow_dispatch: | |
jobs: | |
buildrelease: | |
name: "Build release" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: "Download main program" | |
id: download_main | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: "PrepPipe/preppipe-python" | |
tag: "latest-main" | |
fileName: "preppipe-windows-x64.7z" | |
tarBall: false | |
zipBall: false | |
out-file-path: "." | |
- name: "Print Version" | |
shell: bash | |
run: | | |
echo "${{steps.download_main.outputs.release_name}}" | cut -d " " -f1 | tee VERSION.txt | |
[ -s VERSION.txt ] && echo "PPVERSION=$(cat VERSION.txt)" >> $GITHUB_ENV | |
- name: "Extract Main Program" | |
shell: bash | |
run: | | |
7z x preppipe-windows-x64.7z -owindows-x64 | |
rm -f preppipe-windows-x64.7z | |
- name: "Download GUI" | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: "PrepPipe/preppipe_gui" | |
tag: "latest" | |
fileName: "preppipe_gui-windows-x64.7z" | |
tarBall: false | |
zipBall: false | |
out-file-path: "." | |
- name: "Extract GUI" | |
shell: bash | |
run: | | |
7z x preppipe_gui-windows-x64.7z -owindows-x64 | |
rm -f preppipe_gui-windows-x64.7z | |
- name: "Download Documentation" | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: "PrepPipe/preppipe-docs" | |
tag: "latest" | |
fileName: "docs.zip" | |
tarBall: false | |
zipBall: false | |
out-file-path: "." | |
- name: "Extract Documentation" | |
shell: bash | |
run: | | |
mkdir -p windows-x64/docs | |
unzip docs.zip -d windows-x64/docs | |
- name: "Download ffmpeg" | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: "BtbN/FFmpeg-Builds" | |
tag: "latest" | |
fileName: "ffmpeg-master-latest-win64-lgpl-shared.zip" | |
tarBall: false | |
zipBall: false | |
out-file-path: "." | |
- name: "Extract ffmpeg" | |
shell: bash | |
run: | | |
unzip ffmpeg-master-latest-win64-lgpl-shared.zip "ffmpeg-master-latest-win64-lgpl-shared/bin/*" -d "windows-x64" | |
mv windows-x64/ffmpeg-master-latest-win64-lgpl-shared/bin/* windows-x64/ | |
rm -rf windows-x64/ffmpeg-master-latest-win64-lgpl-shared | |
rm -f ffmpeg-master-latest-win64-lgpl-shared.zip | |
- name: "Prepare release archive" | |
shell: bash | |
run: | | |
7z a -t7z -mx=9 ./preppipe-windows-x64.7z windows-x64/* | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: "${{ env.PPVERSION }} 整合包 (Release Archive)" | |
files: | | |
./preppipe-windows-x64.7z | |
#- name: "Update main branch" | |
# shell: bash | |
# run: | | |
# git config --global user.email "xsj617603321@gmail.com" | |
# git config --global user.name "Shengjie Xu" | |
# git checkout --orphan latest_branch | |
# git add -A | |
# git commit -am "Auto-update" | |
# git branch -M main | |
# git gc | |
#- name: "Push to main" | |
# uses: ad-m/github-push-action@master | |
# with: | |
# github_token: ${{ secrets.PREPPIPE_ALL_IN_ONE_PAT }} | |
# branch: "main" | |
# force: true |