mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 06:23:24 -07:00
Update GH Workflow
This commit is contained in:
parent
bcf01d92ea
commit
bbcbf1cb62
1 changed files with 20 additions and 41 deletions
61
.github/workflows/release.yml
vendored
61
.github/workflows/release.yml
vendored
|
@ -3,9 +3,9 @@ name: .NET Desktop CI/CD
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'release/1.*'
|
||||
paths-ignore:
|
||||
- 'develop'
|
||||
paths-ignore:
|
||||
- 'release/1*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -18,54 +18,33 @@ jobs:
|
|||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '6.0.x' # Setze die gewünschte .NET-Version
|
||||
dotnet-version: '5.0.100' # Setze die gewünschte .NET-Version
|
||||
|
||||
- name: Restore nuget packages and generate credential templates
|
||||
run: dotnet msbuild src/Greenshot.sln /restore /t:PrepareForBuild
|
||||
- name: Restore NuGet packages
|
||||
run: dotnet restore src/Greenshot-Full.sln
|
||||
|
||||
- name: Build and package
|
||||
run: dotnet msbuild src/Greenshot.sln /p:Configuration=Release
|
||||
env:
|
||||
Box13_ClientId: ${{ secrets.Box13_ClientId }}
|
||||
Box13_ClientSecret: ${{ secrets.Box13_ClientSecret }}
|
||||
DropBox13_ClientId: ${{ secrets.DropBox13_ClientId }}
|
||||
DropBox13_ClientSecret: ${{ secrets.DropBox13_ClientSecret }}
|
||||
Flickr_ClientId: ${{ secrets.Flickr_ClientId }}
|
||||
Flickr_ClientSecret: ${{ secrets.Flickr_ClientSecret }}
|
||||
Imgur13_ClientId: ${{ secrets.Imgur13_ClientId }}
|
||||
Imgur13_ClientSecret: ${{ secrets.Imgur13_ClientSecret }}
|
||||
Photobucket_ClientId: ${{ secrets.Photobucket_ClientId }}
|
||||
Photobucket_ClientSecret: ${{ secrets.Photobucket_ClientSecret }}
|
||||
Picasa_ClientId: ${{ secrets.Picasa_ClientId }}
|
||||
Picasa_ClientSecret: ${{ secrets.Picasa_ClientSecret }}
|
||||
- name: Publish single-exe x64
|
||||
run: dotnet publish src/Greenshot/Greenshot.csproj -f net5.0-windows -c Release /p:PublishSingleFile=true /p:IncludeAllContentForSelfExtract=true /p:RuntimeIdentifier=win-x64
|
||||
|
||||
- name: Rename single-exe x64
|
||||
run: |
|
||||
Rename-Item "$(Build.SourcesDirectory)\src\Greenshot\bin\Release\net5.0-windows\win-x64\publish\Greenshot.exe" "Greenshot-x64.exe"
|
||||
|
||||
- name: Publish single-exe x86
|
||||
run: dotnet publish src/Greenshot/Greenshot.csproj -f net5.0-windows -c Release /p:PublishSingleFile=true /p:IncludeAllContentForSelfExtract=true /p:RuntimeIdentifier=win-x86
|
||||
|
||||
- name: Rename single-exe x86
|
||||
run: |
|
||||
Rename-Item "$(Build.SourcesDirectory)\src\Greenshot\bin\Release\net5.0-windows\win-x86\publish\Greenshot.exe" "Greenshot-x86.exe"
|
||||
|
||||
- name: Copy Files to Artifact Staging Directory
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/drop
|
||||
Copy-Item -Path "$(Build.SourcesDirectory)\installer\Greenshot-INSTALLER-*.exe" -Destination "${{ github.workspace }}/drop" -Force
|
||||
Copy-Item -Path "$(Build.SourcesDirectory)\src\Greenshot\bin\Release\net5.0-windows\win-x64\publish\Greenshot-x64.exe" -Destination "${{ github.workspace }}/drop" -Force
|
||||
Copy-Item -Path "$(Build.SourcesDirectory)\src\Greenshot\bin\Release\net5.0-windows\win-x86\publish\Greenshot-x86.exe" -Destination "${{ github.workspace }}/drop" -Force
|
||||
|
||||
- name: Publish Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: drop
|
||||
path: ${{ github.workspace }}/drop/*.exe
|
||||
|
||||
deploy:
|
||||
runs-on: windows-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: drop
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: v${{ github.run_number }}
|
||||
release_name: Greenshot ${{ github.run_number }} unstable
|
||||
draft: true
|
||||
prerelease: true
|
||||
files: ${{ github.workspace }}/drop/*.exe
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue