Skip to content

Commit

Permalink
Added a GitHub draft release workflow for v2.53.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gh-andre committed Feb 20, 2023
1 parent fc52e8e commit 5f15e4a
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/draft-release-2.53.1.yml
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

0 comments on commit 5f15e4a

Please sign in to comment.