-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a GitHub draft release workflow for v2.53.1
- Loading branch information
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# | ||
# This workflow builds a patched up KeePass.exe that uses larger | ||
# font and packages it along with a few more files in an archive | ||
# file, which is uploaded to a GitHub draft release as an asset. | ||
# | ||
# GitHub maintains workflow run numbers per file name. This file | ||
# should be renamed in the new release branch to start a new | ||
# sequence. | ||
# | ||
name: Draft Release 2.53.1 | ||
|
||
on: workflow_dispatch | ||
|
||
env: | ||
VERSION: 2.53.1 | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
|
||
jobs: | ||
draft-release: | ||
name: Build KeePassFont | ||
runs-on: windows-2022 | ||
|
||
# this path is valid only for the windows-2022 runner | ||
env: | ||
VCVARSALL: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall' | ||
|
||
defaults: | ||
run: | ||
shell: cmd | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
# build all projects in the solution | ||
- name: Build KeePass.exe | ||
run: | | ||
call "${{ env.VCVARSALL }}" x64 | ||
msbuild /nologo /target:Rebuild /property:Configuration=Release;Platform="Any CPU" /nr:false KeePass.sln | ||
# collect and package only files that can be dropped into the installation folder | ||
- name: Create package | ||
run: | | ||
mkdir KeePassFont-${{ env.VERSION }} | ||
mkdir KeePassFont-${{ env.VERSION }}\XSL\ | ||
copy /y Build\KeePass\Release\KeePass.exe KeePassFont-${{ env.VERSION }}\ | ||
copy /y Build\KeePass\Release\KeePass.XmlSerializers.dll KeePassFont-${{ env.VERSION }}\ | ||
copy /y Ext\XSL\KDBX_Dump_HTML.xsl KeePassFont-${{ env.VERSION }}\XSL\ | ||
copy /y README.md KeePassFont-${{ env.VERSION }}\ | ||
7z a KeePassFont-${{ env.VERSION }}+${{ env.BUILD_NUMBER }}.windows.x64.zip KeePassFont-${{ env.VERSION }}\ | ||
# create an draft release | ||
- name: Create a draft release | ||
id: draft-release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.VERSION }}+${{ env.BUILD_NUMBER }} | ||
release_name: KeePassFont ${{ env.VERSION }}+${{ env.BUILD_NUMBER }} | ||
draft: true | ||
|
||
# upload packaged artifacts into the draft release as assets | ||
- name: Upload release assets | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.draft-release.outputs.upload_url }} | ||
asset_path: KeePassFont-${{ env.VERSION }}+${{ env.BUILD_NUMBER }}.windows.x64.zip | ||
asset_name: KeePassFont-${{ env.VERSION }}+${{ env.BUILD_NUMBER }}.windows.x64.zip | ||
asset_content_type: application/zip |