Skip to content

Commit

Permalink
ci: update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyc committed Sep 4, 2022
1 parent f4caa19 commit 63225e5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ jobs:
sudo apt-get install -y unzip
if [ $(uname -m) == 'x86_64' ]; then
wget https://devtools.qiniu.com/qshell-v2.9.0-linux-amd64.tar.gz
wget https://github.com/qiniu/qshell/releases/download/v2.9.0/qshell-v2.9.0-linux-amd64.tar.gz
tar -xvf qshell-v2.9.0-linux-amd64.tar.gz
else
wget https://devtools.qiniu.com/qshell-v2.9.0-linux-386.tar.gz
wget https://github.com/qiniu/qshell/releases/download/v2.9.0/qshell-v2.9.0-linux-386.tar.gz
tar -xvf qshell-v2.9.0-linux-386.tar.gz
fi
chmod +x qshell
Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/release-qiniu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@ jobs:
name: "Upload to QiNiu"
runs-on: "ubuntu-latest"
steps:
- name: "Upload to QiNiu"
env:
QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }}
QINIU_AK: ${{ secrets.QINIU_AK }}
QINIU_SK: ${{ secrets.QINIU_SK }}
run: |
sudo apt-get update
sudo apt-get install -y unzip
- name: "Upload to QiNiu"
env:
QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }}
QINIU_AK: ${{ secrets.QINIU_AK }}
QINIU_SK: ${{ secrets.QINIU_SK }}
run: |
sudo apt-get update
sudo apt-get install -y unzip
if [ $(uname -m) == 'x86_64' ]; then
wget https://devtools.qiniu.com/qshell-v2.7.0-linux-amd64.tar.gz
tar -xvf qshell-v2.7.0-linux-amd64.tar.gz
else
wget https://devtools.qiniu.com/qshell-v2.7.0-linux-386.tar.gz
tar -xvf qshell-v2.7.0-linux-386.tar.gz
fi
chmod +x qshell
./qshell account -w ${QINIU_AK} ${QINIU_SK} deploy-account
if [ $(uname -m) == 'x86_64' ]; then
wget https://github.com/qiniu/qshell/releases/download/v2.9.0/qshell-v2.9.0-linux-amd64.tar.gz
tar -xvf qshell-v2.9.0-linux-amd64.tar.gz
else
wget https://github.com/qiniu/qshell/releases/download/v2.9.0/qshell-v2.9.0-linux-386.tar.gz
tar -xvf qshell-v2.9.0-linux-386.tar.gz
fi
chmod +x qshell
./qshell account -w ${QINIU_AK} ${QINIU_SK} deploy-account
curl https://api.github.com/repos/PiSugar/pisugar-power-manager-rs/releases/latest > latest
curl https://api.github.com/repos/PiSugar/pisugar-power-manager-rs/releases/latest > latest
sudo apt-get install -y jq
for url in $(jq '.assets[].browser_download_url' latest); do
url=$(echo $url | awk -F '"' '{print $2}')
filename=${url##*/}
wget -O ${filename} ${url}
mimetype=application/octet-stream
if (echo "$filename" | grep '.*.sh$'); then
mimetype=text/plain
fi
./qshell rput --overwrite --mimetype ${mimetype} ${QINIU_BUCKET} release/${filename} ${filename}
done
sudo apt-get install -y jq
for url in $(jq '.assets[].browser_download_url' latest); do
url=$(echo $url | awk -F '"' '{print $2}')
filename=${url##*/}
wget -O ${filename} ${url}
mimetype=application/octet-stream
if (echo "$filename" | grep '.*.sh$'); then
mimetype=text/plain
fi
./qshell rput --overwrite --mimetype ${mimetype} ${QINIU_BUCKET} release/${filename} ${filename}
done

0 comments on commit 63225e5

Please sign in to comment.