Skip to content

Update deployment-develop.yml #251

Update deployment-develop.yml

Update deployment-develop.yml #251

name: Deployment Pipeline for develop branch
on:
push:
branches:
- develop
jobs:
deploy:
permissions: write-all
runs-on: windows-latest
outputs:
version: ${{ steps.release.outputs.version }}
steps:
- name: Checkout repository
id: checkout
uses: actions/checkout@v2
- name: Set up .NET
id: setup
uses: actions/[email protected]
with:
dotnet-version: '8.x'
- name: Build .NET solution
id: build
run: |
dotnet build gamevault.sln --configuration Release
7z a GameVault.zip gamevault/bin
- name: Get release information
id: release
run: |
$repo = "Phalcode/gamevault-app"
$tag = "unstable"
$releaseApiUrl = "https://api.github.com/repos/$repo/releases/tags/$tag"
$release = Invoke-RestMethod -Uri $releaseApiUrl -Headers @{ Authorization = "Bearer $env:GITHUB_TOKEN" }
$uploadUrl = $release.upload_url -replace "{\?name,label}", ""
Write-Host "upload_url=$uploadUrl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Artifact
id: upload
uses: actions/upload-release-asset@v1
with:
asset_path: GameVault.zip
asset_name: GameVault.zip
asset_content_type: application/zip
upload_url: ${{ env.upload_url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}