From 975b8ff17a27c9f70b7aceb207db25f16e2bd0fc Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Thu, 25 Dec 2025 11:44:22 +0300 Subject: [PATCH] Added CI/CD config to download jepricreations' cursors via DeviantArt API --- .github/workflows/Cursors.yml | 32 ++++++++++++++++++++++++++++ Cursors/Readme.txt | 27 ++++++++++++++++++++++++ Misc/Link.txt | 1 - Scripts/Cursors.ps1 | 39 +++++++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/Cursors.yml create mode 100644 Cursors/Readme.txt delete mode 100644 Misc/Link.txt create mode 100644 Scripts/Cursors.ps1 diff --git a/.github/workflows/Cursors.yml b/.github/workflows/Cursors.yml new file mode 100644 index 00000000..5108c530 --- /dev/null +++ b/.github/workflows/Cursors.yml @@ -0,0 +1,32 @@ +name: Download cursors + +on: + workflow_dispatch: + +permissions: + contents: write + +jobs: + download-and-save: + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@main + + - name: Get token and download cursors + env: + DEVIANTART_CLIENT_ID: ${{ secrets.DEVIANTART_CLIENT_ID }} + DEVIANTART_CLIENT_SECRET: ${{ secrets.DEVIANTART_CLIENT_SECRET }} + run: | + . "Scripts\Cursors.ps1" + + - name: Commit and push changes + run: | + # Save Windows11Cursors.zip to Cursors folder + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + + git add Cursors/Windows11Cursors.zip + git commit -m "Update Windows11Cursors.zip archive" + git push diff --git a/Cursors/Readme.txt b/Cursors/Readme.txt new file mode 100644 index 00000000..18727bbf --- /dev/null +++ b/Cursors/Readme.txt @@ -0,0 +1,27 @@ +Hi! thank you for use my cursors. + +To install them, you just have to go inside the folder of the cursor you want to install "dark" or "light", and you will find a file named install, just right click on it and in the menu press install. + +I hope you enjoy them! + +You can find a more complete version with HDPi resolution and some cool alternatives in the next link: + +https://www.deviantart.com/jepricreations/art/Windows-11-Cursors-Concept-HD-v2-890672103 + +AGREEMENT +By Getting this Cursor Pack you're allowed to... + +Use the cursor pack in your computer or whatever device is compatible. +Modify the cursor pack for personal use. +Publish your heavily modified version of the pack.* +Share and distribute the pack of cursors without remuneration.* + +You're not allowed to... + +Share and distribute the pack of cursors with remuneration. +Claim (and rename) my cursor pack as your own. +Use monetized URL shorteners to my site or files. + +*My cursor and myself (the author) should be credited clearly, add link to my DeviantArt Page. +https://www.deviantart.com/jepricreations +https://jepricreations.com diff --git a/Misc/Link.txt b/Misc/Link.txt deleted file mode 100644 index 41748b89..00000000 --- a/Misc/Link.txt +++ /dev/null @@ -1 +0,0 @@ -https://www.deviantart.com/jepricreations/art/Windows-11-Cursors-Concept-886489356 diff --git a/Scripts/Cursors.ps1 b/Scripts/Cursors.ps1 new file mode 100644 index 00000000..975cb8b6 --- /dev/null +++ b/Scripts/Cursors.ps1 @@ -0,0 +1,39 @@ +# https://www.deviantart.com/jepricreations/art/Windows-11-Cursors-Concept-886489356 +# https://www.deviantart.com/developers/authentication +# https://www.deviantart.com/studio/apps + +# Get access token +$Body = @{ + grant_type = "client_credentials" + client_id = $env:DEVIANTART_CLIENT_ID + client_secret = $env:DEVIANTART_CLIENT_SECRET +} +$Parameters = @{ + Uri = "https://www.deviantart.com/oauth2/token" + Body = $Body + Verbose = $true + UseBasicParsing = $true +} +$Response = Invoke-RestMethod @Parameters + +# Get download URL +$Body = @{ + access_token = $Response.access_token +} +$Parameters = @{ + # UUID is 8A8DC033-242C-DD2E-EDB0-CC864772D5F4 + Uri = "https://www.deviantart.com/api/v1/oauth2/deviation/download/8A8DC033-242C-DD2E-EDB0-CC864772D5F4" + Body = $Body + Verbose = $true + UseBasicParsing = $true +} +$Response = Invoke-RestMethod @Parameters + +# Download archive +$Parameters = @{ + Uri = $Response.src + OutFile = "Cursors\Windows11Cursors.zip" + Verbose = $true + UseBasicParsing = $true +} +Invoke-WebRequest @Parameters