diff --git a/.github/workflows/rom.yml b/.github/workflows/rom.yml index b3a811c..f2c7298 100644 --- a/.github/workflows/rom.yml +++ b/.github/workflows/rom.yml @@ -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 }} - \ No newline at end of file + - 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 }} diff --git a/tool/Script/Upload.sh b/tool/Script/Upload.sh index 3790510..40f1b55 100755 --- a/tool/Script/Upload.sh +++ b/tool/Script/Upload.sh @@ -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