.forgejo/workflows/dotnet.yaml aktualisiert
Some checks failed
Dotnet Build / build (push) Failing after 1m39s
Some checks failed
Dotnet Build / build (push) Failing after 1m39s
This commit is contained in:
parent
6846729432
commit
77250ee7c1
1 changed files with 23 additions and 10 deletions
|
@ -75,13 +75,26 @@ jobs:
|
|||
git tag v$env:PROJECT_VERSION
|
||||
git push origin v$env:PROJECT_VERSION
|
||||
|
||||
- name: Upload to Forgejo
|
||||
uses: actions/forgejo-release@v2.6.0
|
||||
with:
|
||||
direction: upload
|
||||
url: https://git.weexnes.dev/
|
||||
repo: WeeXnes/Cryptura
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
tag: v${{ steps.get_version.outputs.version }}
|
||||
release-dir: release
|
||||
release-notes: "Automated release for version ${{ steps.get_version.outputs.version }}"
|
||||
- name: Upload Release Asset to Forgejo
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
PROJECT_VERSION: ${{ env.PROJECT_VERSION }}
|
||||
run: |
|
||||
$repoOwner = "WeeXnes"
|
||||
$repoName = "WeeXnesSuite"
|
||||
$tag = "$env:PROJECT_VERSION"
|
||||
$fileName = "currentRelease_$env:PROJECT_VERSION.zip"
|
||||
$filePath = "release/$fileName"
|
||||
$uploadUrl = "https://git.weexnes.dev/api/v1/repos/$repoOwner/$repoName/releases/tags/$tag"
|
||||
|
||||
|
||||
$release = Invoke-RestMethod -Headers @{ Authorization = "token $env:RELEASE_TOKEN" } -Uri $uploadUrl
|
||||
$uploadUrlTemplate = $release.upload_url
|
||||
$uploadUrlFinal = $uploadUrlTemplate -replace "\{\?name,label\}", "?name=$fileName"
|
||||
|
||||
|
||||
Invoke-RestMethod -Uri $uploadUrlFinal `
|
||||
-Headers @{ Authorization = "token $env:RELEASE_TOKEN" } `
|
||||
-Method Post `
|
||||
-ContentType "application/zip" `
|
||||
-InFile $filePath
|
||||
|
|
Loading…
Add table
Reference in a new issue