Browse Source

Added CI/CD config to download jepricreations' cursors via DeviantArt API

pull/694/head
Dmitry Nefedov 3 months ago
parent
commit
975b8ff17a
  1. 32
      .github/workflows/Cursors.yml
  2. 27
      Cursors/Readme.txt
  3. 1
      Misc/Link.txt
  4. 39
      Scripts/Cursors.ps1

32
.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

27
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

1
Misc/Link.txt

@ -1 +0,0 @@
https://www.deviantart.com/jepricreations/art/Windows-11-Cursors-Concept-886489356

39
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
Loading…
Cancel
Save