Skip to content

Commit

Permalink
fix: 上传
Browse files Browse the repository at this point in the history
  • Loading branch information
cc1477 committed Oct 28, 2023
1 parent 1bc5759 commit 7ec423f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 31 deletions.
64 changes: 34 additions & 30 deletions .github/workflows/rom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,43 @@ name: Start-ROM
on:
watch:
types: [started]

env:
TZ: Asia/Shanghai

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Initializing the environment
run: |
cd $GITHUB_WORKSPACE/tool
sudo -s bash ./Script/Setup.sh
- name: Download Rom
run: |
cd $GITHUB_WORKSPACE/tool
sudo -s bash ./Script/Download.sh
- name: Start working on Rom & Upload Rom
run: |
cd $GITHUB_WORKSPACE/tool
sudo -s bash tool.sh
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
$GITHUB_WORKSPACE/tool/Work/Magisk-Recover.zip
$GITHUB_WORKSPACE/tool/Work/log-*.zip
$GITHUB_WORKSPACE/tool/Work/*.zip
token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v2

- name: Initializing the environment
run: |
cd $GITHUB_WORKSPACE/tool
sudo -s bash ./Script/Setup.sh
- name: Download Rom
run: |
cd $GITHUB_WORKSPACE/tool
sudo -s bash ./Script/Download.sh
- name: Start working on Rom & Upload Rom
run: |
cd $GITHUB_WORKSPACE/tool
sudo -s bash tool.sh
- name: Get the latest tag
id: get_tag
run: echo ::set-output name=tag::$(git describe --abbrev=0 --tags)

- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
$GITHUB_WORKSPACE/tool/Work/Magisk-Recover.zip
$GITHUB_WORKSPACE/tool/Work/log-*.zip
$GITHUB_WORKSPACE/tool/Work/*.zip
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.get_tag.outputs.tag }}
4 changes: 3 additions & 1 deletion tool/Script/Upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ if [[ -z $Upload ]];then
echo "$(date "+[ %H:%M:%S ]") 未填写上传网盘,自动上传到gof"
Upload=gof
fi
curl -sL https://git.io/file-transfer | sh > /dev/null 2>&1
# curl -sL https://git.io/file-transfer | sh > /dev/null 2>&1
curl -sL https://git.io/file-transfer | bash -s beta

if [[ ! -x $M/transfer ]];then
echo "$(date "+[ %H:%M:%S ]") 未发现transfer,已停止上传"
exit 1
Expand Down

0 comments on commit 7ec423f

Please sign in to comment.