Skip to content

Commit

Permalink
Update buildappwhr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thun888 authored Jul 26, 2024
1 parent 0105ea3 commit 8937686
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions .github/workflows/buildappwhr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,29 +114,33 @@ jobs:
name: mirouter-ui-darwin
path: ./build

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
- name: Upload Release Assets
uses: ncipollo/release-action@v1
with:
tag_name: ${{ github.event.inputs.version }}whr
release_name: Release ${{ github.event.inputs.version }} without history record
artifacts: "build/*"
token: ${{ secrets.TOKEN }}
tag: ${{ github.event.inputs.version }}whr
name: Release ${{ github.event.inputs.version }} without history record
draft: true
prerelease: false

# 安装 rclone
- name: Install rclone
run: |
cd ~
curl https://rclone.org/install.sh | sudo bash
- name: Upload Release Assets
# 配置 rclone
- name: Configure rclone
run: |
mkdir -p ~/.config/rclone
cat > ~/.config/rclone/rclone.conf << EOF
${{ secrets.RCLONECONFIG }}
EOF
- name: Sync to OneDrive
run: |
for file in ./build/*; do
if [ -f "$file" ]; then
echo "Uploading $file"
curl \
-H "Authorization: token ${{ secrets.TOKEN }}" \
-H "Content-Type: $(file -b --mime-type $file)" \
--data-binary @"$file" \
"${{ steps.create_release.outputs.upload_url }}=$(basename $file)"
fi
done
sudo timedatectl set-timezone "Asia/Shanghai"
rclone mkdir one:/share/Mirouter-ui/whr/${{ github.event.inputs.version }}
rclone sync ./build one:/share/Mirouter-ui/whr/${{ github.event.inputs.version }}
builddocker:
runs-on: ubuntu-20.04
Expand Down

0 comments on commit 8937686

Please sign in to comment.