This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
🐛Update github action webdav provider #75
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
# This is a basic workflow to help you get started with Actions | |
name: Build Windows | |
# Controls when the action will run. | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
# schedule: | |
# - cron: "0 0 * * */3" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
tags: | |
description: 'Test scenario tags' | |
env: | |
TZ: Asia/Shanghai | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
buildx: | |
runs-on: ${{ matrix.target.os }} | |
strategy: | |
matrix: | |
target: | |
- { os: windows-2022, arch: amd64, suffix: windows } | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Get current date | |
id: date | |
run: echo "::set-output name=today::$(date +'%Y%m%d')" | |
- | |
name: Setup Graalvm | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '17' | |
distribution: 'graalvm' | |
components: 'native-image' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cache: 'gradle' | |
# Set VERSION_INFORMATION | |
- run: echo "VERSION_INFORMATION=$(./gradlew --no-daemon -q ciPrintVersionInformation)" >> $env:GITHUB_ENV | |
- | |
name: Build project | |
run: ./gradlew --no-daemon nativeCompile | |
- | |
run: mv build/native/nativeCompile/aliyundrive-webdav.exe build/native/nativeCompile/aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe | |
- | |
name: Archive artifacts | |
uses: thedoctor0/[email protected] | |
with: | |
type: 'zip' | |
filename: 'aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe.zip' | |
directory: 'build/native/nativeCompile/' | |
path: "./aliyundrive-webdav-${{matrix.target.suffix}}-${{matrix.target.arch}}.exe" | |
- | |
name: Upload artifacts | |
uses: Wandalen/wretry.action@master | |
with: | |
action: bxb100/action-upload@main | |
with: | | |
provider: webdav | |
provider_options: | | |
endpoint=${{secrets.WEBDAV_ADDRESS}} | |
username=${{secrets.WEBDAV_USERNAME}} | |
password=${{secrets.WEBDAV_PASSWORD}} | |
root=/${{ env.VERSION_INFORMATION }}/ | |
include: | | |
build/native/nativeCompile/aliyundrive-webdav-${{matrix.target.suffix}}-*.exe.zip | |
attempt_limit: 3 | |
attempt_delay: 0 |