mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 22:13:23 -07:00
Create unsigned release by default
This commit is contained in:
commit
b178c4d423
5 changed files with 69 additions and 68 deletions
115
.github/workflows/release.yml
vendored
115
.github/workflows/release.yml
vendored
|
@ -66,61 +66,62 @@ jobs:
|
|||
name: drop
|
||||
path: ${{ github.workspace }}/artifacts
|
||||
|
||||
# deploy:
|
||||
# runs-on: windows-latest
|
||||
# needs: build
|
||||
#
|
||||
# steps:
|
||||
#
|
||||
# - name: Checkout repository
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
#
|
||||
# - name: Download build artifacts
|
||||
# uses: actions/download-artifact@v4
|
||||
# with:
|
||||
# name: drop Name of the artifact uploaded in previous steps
|
||||
# path: drop Local folder where artifacts are downloaded
|
||||
#
|
||||
# - name: Extract version from file name
|
||||
# id: extract_version
|
||||
# run: |
|
||||
# $file = Get-ChildItem drop -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -First 1
|
||||
# if (-not $file) {
|
||||
# throw "No matching file found in 'drop' directory."
|
||||
# }
|
||||
# if ($file.Name -match "Greenshot-INSTALLER-([\d\.]+).*\.exe") {
|
||||
# echo "version=$($matches[1])" >> $Env:GITHUB_OUTPUT
|
||||
# } else {
|
||||
# throw "Version number could not be extracted from file name: $($file.Name)"
|
||||
# }
|
||||
# shell: pwsh
|
||||
#
|
||||
# - name: Create tag
|
||||
# run: |
|
||||
# git config user.name "github-actions[bot]"
|
||||
# git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
# git tag -a "v${{ steps.extract_version.outputs.version }}" -m "v${{ steps.extract_version.outputs.version }}"
|
||||
# git push origin "v${{ steps.extract_version.outputs.version }}"
|
||||
#
|
||||
# - name: Create GitHub Release
|
||||
# uses: softprops/action-gh-release@v2
|
||||
# with:
|
||||
# name: "Greenshot ${{ steps.extract_version.outputs.version }} unstable"
|
||||
# tag_name: "v${{ steps.extract_version.outputs.version }}"
|
||||
# files: drop/*.exe
|
||||
# generate_release_notes: true
|
||||
# draft: true
|
||||
# prerelease: true
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
#
|
||||
# - name: Trigger GitHub Pages rebuild
|
||||
# shell: bash
|
||||
# run: |
|
||||
# curl -X POST \
|
||||
# -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
# -H "Accept: application/vnd.github+json" \
|
||||
# https://api.github.com/repos/${{ github.repository }}/pages/builds
|
||||
deploy:
|
||||
runs-on: windows-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: drop Name of the artifact uploaded in previous steps
|
||||
path: drop Local folder where artifacts are downloaded
|
||||
|
||||
- name: Extract version from file name
|
||||
id: extract_version
|
||||
run: |
|
||||
$file = Get-ChildItem drop -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -First 1
|
||||
if (-not $file) {
|
||||
throw "No matching file found in 'drop' directory."
|
||||
}
|
||||
if ($file.Name -match "Greenshot-INSTALLER-([\d\.]+).*\.exe") {
|
||||
echo "version=$($matches[1])" >> $Env:GITHUB_OUTPUT
|
||||
echo "attribs=$($matches[2])" | tr -d '-' ' ' | tr '[:upper:]' '[:lower:]' >> $Env:GITHUB_OUTPUT
|
||||
} else {
|
||||
throw "Version number could not be extracted from file name: $($file.Name)"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
- name: Create tag
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git tag -a "v${{ steps.extract_version.outputs.version }}" -m "v${{ steps.extract_version.outputs.version }}"
|
||||
git push origin "v${{ steps.extract_version.outputs.version }}"
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: "Greenshot ${{ steps.extract_version.outputs.version }}${{ steps.extract_version.outputs.attribs }}"
|
||||
tag_name: "v${{ steps.extract_version.outputs.version }}"
|
||||
files: drop/*.exe
|
||||
generate_release_notes: true
|
||||
# draft: true
|
||||
prerelease: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Trigger GitHub Pages rebuild
|
||||
shell: bash
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
https://api.github.com/repos/${{ github.repository }}/pages/builds
|
||||
|
||||
|
|
2
.github/workflows/update-gh-pages.yml
vendored
2
.github/workflows/update-gh-pages.yml
vendored
|
@ -13,6 +13,6 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer ${{ secrets.GH_PAT_JKL }}" \
|
||||
-H "Authorization: Bearer ${{ secrets.GH_PAGES_TOKEN }}" \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
https://api.github.com/repos/${{ github.repository }}/pages/builds
|
||||
|
|
|
@ -87,7 +87,7 @@ $ReleaseData = @{
|
|||
generate_release_notes = $true
|
||||
}
|
||||
$ReleaseResponse = Invoke-RestMethod `
|
||||
-Uri "https://api.github.com/repos/jklingen/greenshot/releases" `
|
||||
-Uri "https://api.github.com/repos/greenshot/greenshot/releases" `
|
||||
-Method POST `
|
||||
-Headers $Headers `
|
||||
-Body (ConvertTo-Json $ReleaseData -Depth 10)
|
||||
|
@ -138,7 +138,6 @@ Write-Host "File uploaded successfully: $FileName"
|
|||
# Step 7: Trigger GitHub Pages Rebuild
|
||||
#Write-Host "Triggering GitHub Pages rebuild..."
|
||||
#Invoke-RestMethod `
|
||||
# -Uri "https://api.github.com/repos/jklingen/greenshot/pages/builds" `
|
||||
# -Method POST `
|
||||
# -Headers $Headers
|
||||
#if ($LASTEXITCODE -ne 0) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define BinDir "bin\Release\net472"
|
||||
#define ReleaseDir "..\..\src\Greenshot\bin\Release\net472"
|
||||
#define PluginDir "..\..\src\Greenshot\bin\Release\net472\Plugins"
|
||||
#define CertumThumbprint GetEnv('CertumThumbprint')
|
||||
|
||||
; Include the scripts to install .NET Framework
|
||||
; See https://www.codeproject.com/KB/install/dotnetfx_innosetup_instal.aspx
|
||||
|
@ -132,16 +133,16 @@ InfoBeforeFile=..\additional_files\readme.txt
|
|||
LicenseFile=..\additional_files\license.txt
|
||||
LanguageDetectionMethod=uilanguage
|
||||
MinVersion=6.1sp1
|
||||
OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE
|
||||
OutputDir=..\
|
||||
PrivilegesRequired=lowest
|
||||
SetupIconFile=..\..\src\Greenshot\icons\applicationIcon\icon.ico
|
||||
; Create a SHA1 signature
|
||||
; SignTool=SignTool sign /debug /fd sha1 /tr https://time.certum.pl /td sha1 $f
|
||||
; Append a SHA256 to the previous SHA1 signature (this is what as does)
|
||||
; SignTool=SignTool sign /debug /as /fd sha256 /tr https://time.certum.pl /td sha256 $f
|
||||
SignTool=SignTool sign /sha1 "{#GetEnv('CertumThumbprint')}" /tr http://time.certum.pl /td sha256 /fd sha256 /v $f
|
||||
;SignedUninstaller=yes
|
||||
#if CertumThumbprint != ""
|
||||
OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE
|
||||
SignTool=SignTool sign /sha1 "{#CertumThumbprint }" /tr http://time.certum.pl /td sha256 /fd sha256 /v $f
|
||||
SignedUninstaller=yes
|
||||
#else
|
||||
OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE-UNSIGNED
|
||||
#endif
|
||||
UninstallDisplayIcon={app}\{#ExeName}.exe
|
||||
Uninstallable=true
|
||||
VersionInfoCompany={#ExeName}
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Release'">
|
||||
<SetEnvironmentVariableTask Name="BuildVersionSimple" Value="$(BuildVersionSimple)" />
|
||||
<SetEnvironmentVariableTask Name="AssemblyInformationalVersion" Value="$(AssemblyInformationalVersion)" />
|
||||
<Exec Command='signtool.exe sign /sha1 "$(CertumThumbprint)" /tr http://time.certum.pl /td sha256 /fd sha256 /v "$(OutDir)Greenshot.exe"' />
|
||||
<Exec Command="if not "$(CertumThumbprint)" == "" signtool.exe sign /sha1 "$(CertumThumbprint)" /tr http://time.certum.pl /td sha256 /fd sha256 /v "$(OutDir)Greenshot.exe"" />
|
||||
<Exec Command="$(PkgTools_InnoSetup)\tools\ISCC.exe $(SolutionDir)\..\installer\innosetup\setup.iss" />
|
||||
</Target>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue