Dmitry Nefedov
2 years ago
committed by
GitHub
2 changed files with 49 additions and 0 deletions
@ -0,0 +1,41 @@ |
|||
name: test |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- "*" |
|||
workflow_dispatch: |
|||
|
|||
jobs: |
|||
patch: |
|||
runs-on: windows-latest |
|||
timeout-minutes: 5 |
|||
steps: |
|||
- uses: actions/checkout@main |
|||
|
|||
- name: test.md |
|||
id: read_release |
|||
run: | |
|||
$Parameters = @{ |
|||
Uri = "https://api.github.com/repos/farag2/Sophia-Script-for-Windows/releases" |
|||
UseBasicParsing = $true |
|||
Verbose = $true |
|||
} |
|||
$Penultimate = (Invoke-RestMethod @Parameters).tag_name | Select-Object -Index 1 |
|||
|
|||
# https://en.wikipedia.org/wiki/Percent-encoding |
|||
$Release = (Get-Content -Path ReleaseNotes.md -Encoding utf8 -Raw).replace("`n", "%0A").replace("`r", "%0D").replace("NewVersion", "${{ github.ref }}").replace("ReleaseDate", "$((Get-Date).ToShortDateString())").replace("OldVersion", "$($Penultimate)") |
|||
|
|||
# https://trstringer.com/github-actions-multiline-strings/ |
|||
echo "::set-output name=RELEASE_BODY::$Release" |
|||
|
|||
- name: Uploading |
|||
uses: svenstaro/upload-release-action@master |
|||
with: |
|||
repo_token: ${{ secrets.GITHUB_TOKEN }} |
|||
file: ReleaseNotes.md |
|||
tag: ${{ github.ref }} |
|||
body: ${{ steps.read_release.outputs.RELEASE_BODY }} |
|||
overwrite: true |
|||
file_glob: true |
|||
prerelease: true |
@ -0,0 +1,8 @@ |
|||
# [Donate](https://github.com/Sophia-Community/SophiApp#donations) |
|||
|
|||
[![actions](https://img.shields.io/badge/Sophia%20News-Telegram-blue?style=flat&logo=Telegram)](https://t.me/SophiaNews) [![actions](https://img.shields.io/badge/Sophia%20Chat-Telegram-blue?style=flat&logo=Telegram)](https://t.me/Sophia_Chat) [![actions](https://img.shields.io/github/workflow/status/Sophia-Community/SophiApp/Build%20Release?label=GitHub%20Actions&logo=GitHub)](https://github.com/Sophia-Community/SophiApp/actions) [![Discord](https://discordapp.com/api/guilds/1006179075263561779/widget.png?style=shield)](https://discord.gg/sSryhaEv79) |
|||
|
|||
## NewVersion — ReleaseDate |
|||
|
|||
Diff from vNewVersion |
|||
[OldVersion...NewVersion](https://github.com/Sophia-Community/SophiApp/compare/OldVersion...NewVersion) |
Loading…
Reference in new issue