mirror of
https://github.com/greenshot/greenshot
synced 2025-07-05 20:42:14 -07:00
Publish Unsigned Release on Commit and Purge CloudFlare Cache on Pages Build (#583)
This commit is contained in:
parent
cc063b6426
commit
95d4c1c2d1
4 changed files with 80 additions and 65 deletions
14
.github/workflows/purge-cloudflare-cache.yml
vendored
Normal file
14
.github/workflows/purge-cloudflare-cache.yml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
name: Purge CloudFlare Cache
|
||||||
|
|
||||||
|
on:
|
||||||
|
page_build:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
purge_cache:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: purge
|
||||||
|
uses: jakejarvis/cloudflare-purge-action@master
|
||||||
|
env:
|
||||||
|
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
|
||||||
|
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
|
114
.github/workflows/release.yml
vendored
114
.github/workflows/release.yml
vendored
|
@ -66,61 +66,61 @@ jobs:
|
||||||
name: drop
|
name: drop
|
||||||
path: ${{ github.workspace }}/artifacts
|
path: ${{ github.workspace }}/artifacts
|
||||||
|
|
||||||
# deploy:
|
deploy:
|
||||||
# runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
# needs: build
|
needs: build
|
||||||
#
|
|
||||||
# steps:
|
steps:
|
||||||
#
|
|
||||||
# - name: Checkout repository
|
- name: Checkout repository
|
||||||
# uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
# with:
|
with:
|
||||||
# fetch-depth: 0
|
fetch-depth: 0
|
||||||
#
|
|
||||||
# - name: Download build artifacts
|
- name: Download build artifacts
|
||||||
# uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
# with:
|
with:
|
||||||
# name: drop Name of the artifact uploaded in previous steps
|
name: drop # Name of the artifact uploaded in previous steps
|
||||||
# path: drop Local folder where artifacts are downloaded
|
path: drop # Local folder where artifacts are downloaded
|
||||||
#
|
|
||||||
# - name: Extract version from file name
|
- name: Extract version from file name
|
||||||
# id: extract_version
|
id: extract_version
|
||||||
# run: |
|
run: |
|
||||||
# $file = Get-ChildItem drop -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -First 1
|
$file = Get-ChildItem drop -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -First 1
|
||||||
# if (-not $file) {
|
if (-not $file) {
|
||||||
# throw "No matching file found in 'drop' directory."
|
throw "No matching file found in 'drop' directory."
|
||||||
# }
|
}
|
||||||
# if ($file.Name -match "Greenshot-INSTALLER-([\d\.]+).*\.exe") {
|
if ($file.Name -match "Greenshot-INSTALLER-([\d\.]+)(.*)\.exe") {
|
||||||
# echo "version=$($matches[1])" >> $Env:GITHUB_OUTPUT
|
echo "version=$($matches[1])" >> $Env:GITHUB_OUTPUT
|
||||||
# } else {
|
} else {
|
||||||
# throw "Version number could not be extracted from file name: $($file.Name)"
|
throw "Version number could not be extracted from file name: $($file.Name)"
|
||||||
# }
|
}
|
||||||
# shell: pwsh
|
shell: pwsh
|
||||||
#
|
|
||||||
# - name: Create tag
|
- name: Create tag
|
||||||
# run: |
|
run: |
|
||||||
# git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
# git config user.email "github-actions[bot]@users.noreply.github.com"
|
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 tag -a "v${{ steps.extract_version.outputs.version }}" -m "v${{ steps.extract_version.outputs.version }}"
|
||||||
# git push origin "v${{ steps.extract_version.outputs.version }}"
|
git push origin "v${{ steps.extract_version.outputs.version }}"
|
||||||
#
|
|
||||||
# - name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
# uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
# with:
|
with:
|
||||||
# name: "Greenshot ${{ steps.extract_version.outputs.version }} unstable"
|
name: "Greenshot ${{ steps.extract_version.outputs.version }} (continuous build)"
|
||||||
# tag_name: "v${{ steps.extract_version.outputs.version }}"
|
tag_name: "v${{ steps.extract_version.outputs.version }}"
|
||||||
# files: drop/*.exe
|
files: drop/*.exe
|
||||||
# generate_release_notes: true
|
generate_release_notes: true
|
||||||
# draft: true
|
draft: false
|
||||||
# prerelease: true
|
prerelease: true
|
||||||
# env:
|
env:
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
#
|
|
||||||
# - name: Trigger GitHub Pages rebuild
|
- name: Trigger GitHub Pages rebuild
|
||||||
# shell: bash
|
shell: bash
|
||||||
# run: |
|
run: |
|
||||||
# curl -X POST \
|
curl -X POST \
|
||||||
# -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
# -H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
# https://api.github.com/repos/${{ github.repository }}/pages/builds
|
https://api.github.com/repos/${{ github.repository }}/pages/builds
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#define BinDir "bin\Release\net472"
|
#define BinDir "bin\Release\net472"
|
||||||
#define ReleaseDir "..\..\src\Greenshot\bin\Release\net472"
|
#define ReleaseDir "..\..\src\Greenshot\bin\Release\net472"
|
||||||
#define PluginDir "..\..\src\Greenshot\bin\Release\net472\Plugins"
|
#define PluginDir "..\..\src\Greenshot\bin\Release\net472\Plugins"
|
||||||
|
#define CertumThumbprint GetEnv('CertumThumbprint')
|
||||||
|
|
||||||
; Include the scripts to install .NET Framework
|
; Include the scripts to install .NET Framework
|
||||||
; See https://www.codeproject.com/KB/install/dotnetfx_innosetup_instal.aspx
|
; 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
|
LicenseFile=..\additional_files\license.txt
|
||||||
LanguageDetectionMethod=uilanguage
|
LanguageDetectionMethod=uilanguage
|
||||||
MinVersion=6.1sp1
|
MinVersion=6.1sp1
|
||||||
OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE
|
|
||||||
OutputDir=..\
|
OutputDir=..\
|
||||||
PrivilegesRequired=lowest
|
PrivilegesRequired=lowest
|
||||||
SetupIconFile=..\..\src\Greenshot\icons\applicationIcon\icon.ico
|
SetupIconFile=..\..\src\Greenshot\icons\applicationIcon\icon.ico
|
||||||
; Create a SHA1 signature
|
#if CertumThumbprint != ""
|
||||||
; SignTool=SignTool sign /debug /fd sha1 /tr https://time.certum.pl /td sha1 $f
|
OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE
|
||||||
; Append a SHA256 to the previous SHA1 signature (this is what as does)
|
SignTool=SignTool sign /sha1 "{#CertumThumbprint}" /tr http://time.certum.pl /td sha256 /fd sha256 /v $f
|
||||||
; SignTool=SignTool sign /debug /as /fd sha256 /tr https://time.certum.pl /td sha256 $f
|
SignedUninstaller=yes
|
||||||
SignTool=SignTool sign /sha1 "{#GetEnv('CertumThumbprint')}" /tr http://time.certum.pl /td sha256 /fd sha256 /v $f
|
#else
|
||||||
;SignedUninstaller=yes
|
OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE-UNSIGNED
|
||||||
|
#endif
|
||||||
UninstallDisplayIcon={app}\{#ExeName}.exe
|
UninstallDisplayIcon={app}\{#ExeName}.exe
|
||||||
Uninstallable=true
|
Uninstallable=true
|
||||||
VersionInfoCompany={#ExeName}
|
VersionInfoCompany={#ExeName}
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Release'">
|
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Release'">
|
||||||
<SetEnvironmentVariableTask Name="BuildVersionSimple" Value="$(BuildVersionSimple)" />
|
<SetEnvironmentVariableTask Name="BuildVersionSimple" Value="$(BuildVersionSimple)" />
|
||||||
<SetEnvironmentVariableTask Name="AssemblyInformationalVersion" Value="$(AssemblyInformationalVersion)" />
|
<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" />
|
<Exec Command="$(PkgTools_InnoSetup)\tools\ISCC.exe $(SolutionDir)\..\installer\innosetup\setup.iss" />
|
||||||
</Target>
|
</Target>
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue