Skip to content

Commit

Permalink
Merge pull request #7 from acnicholls/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
acnicholls authored Oct 16, 2024
2 parents a696f95 + 4a77156 commit 8520c62
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Enhancement Request
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the enhancement**
A clear and concise description of what the bug is.

**Current behavior**
what does the application do now?

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Request or Question
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the issue**
Clear this and explain.
86 changes: 86 additions & 0 deletions .github/workflows/build-release-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# This script builds the end user installer for Folder Size Calculator
# and then uses the installed to build the portal binaries
# the portal binaries are them compressed and uploaded to the
# github action as output.
name: build-release-binaries
run-name: Release build for ${{ github.event_name }} triggered by ${{ github.triggering_actor }}
concurrency:
group: release-binaries
on:
pull_request:
branches:
- master
types: [opened, synchronize, reopened]
workflow_dispatch:

jobs:
build-and-upload-binaries:
runs-on: windows-latest
steps:
# get the latest code from the repo
- name: Checkout Code
uses: actions/checkout@v4

# display environment variables, for audit purposes
- name: Check Environment
run: |
dir env:
# add msbuild to the PATH variable
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1

# create the output folder
- name: Create Build Directory
run: mkdir _build

# run msbuild to create the executable
- name: build executable
id: build-ui-executable
working-directory: Solution
run: |
msbuild.exe `
TrangTest.sln `
/nologo `
/nr:false `
/p:DeployOnBuild=true `
/p:DeployDefaultTarget=WebPublish `
/p:WebPublishMethod=FileSystem `
/p:DeleteExistingFiles=True `
/p:platform="Any CPU" `
/p:configuration="Release" `
/p:PublishUrl="..\_build" `
-fl
# send build log to github output
- name: Upload Build Log
id: upload-build-log
uses: actions/upload-artifact@v4
with:
name: build-executable-log
path: ${{ github.workspace }}\Solution\msbuild.log
retention-days: 5

# check for build success before continuing
- name: Upload Check
id: upload-check
if: ${{ steps.build-ui-executable.outcome != 'success' }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('user-installer build failed, no sense continuing...')
# zip the build output
- name: zip build artifact
id: zip-build-artifact
run: |
7z a -tzip ${{ github.workspace }}\Build_Release.zip ${{ github.workspace }}\Solution\TrangTestStub\bin\Release\*
# send build output to github output
- name: Upload Build Artifact
id: upload-build-artifact
uses: actions/upload-artifact@v4
with:
name: build-executable-artifact
path: ${{ github.workspace }}\Build_Release.zip
retention-days: 5
120 changes: 120 additions & 0 deletions .github/workflows/deploy-release-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# This script builds the end user installer for Folder Size Calculator
name: deploy-release-binaries
run-name: Release deploy for ${{ github.event_name }} triggered by ${{ github.triggering_actor }}
concurrency:
group: release-binaries
cancel-in-progress: true
on:
push:
branches:
- master
paths-ignore:
- README.md
- CHANGELOG.md # Should never be edited anyway
- .gitignore
- .github/**
workflow_dispatch:

jobs:
build-and-release-binaries:
runs-on: windows-latest
steps:
# get the latest code from the repo
- name: Checkout Code
uses: actions/checkout@v4

# display environment variables, for audit purposes
- name: Check Environment
run: |
dir env:
# add msbuild to the PATH variable
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1

# create the output folder
- name: Create Build Directory
run: mkdir _build

# run msbuild to compile the code
- name: build executable
id: build-ui-executable
working-directory: Solution
run: |
msbuild.exe `
TrangTest.sln `
/nologo `
/nr:false `
/p:DeployOnBuild=true `
/p:DeployDefaultTarget=WebPublish `
/p:WebPublishMethod=FileSystem `
/p:DeleteExistingFiles=True `
/p:platform="Any CPU" `
/p:configuration="Release" `
/p:PublishUrl="..\_build" `
-fl
# send build log to github output
- name: Upload Build Log
id: upload-build-log
uses: actions/upload-artifact@v4
with:
name: build-executable-log
path: ${{ github.workspace }}\Solution\msbuild.log
retention-days: 5

# check for success before continuing
- name: Upload Check
id: upload-check
if: ${{ steps.build-ui-executable.outcome != 'success' }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('user-installer build failed, no sense continuing...')
# create a tag and a release
- name: Create Tag & Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: release
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: patch
tag_prefix: v
use_github_release_notes: true
release_name: "Release <RELEASE_TAG>"
release_body: "Bug fixes and features for stability of the application."

# display the output of the release
- name: Check Output Parameters
run: |
echo "Got tag name ${{ steps.release.outputs.tag_name }}"
echo "Got release version ${{ steps.release.outputs.version }}"
echo "Upload release artifacts to ${{ steps.release.outputs.upload_url }}"
# zip the build output
- name: zip build artifact
id: zip-build-artifact
run: |
7z a -tzip ${{ github.workspace }}\Build_Release.zip ${{ github.workspace }}\Solution\TrangTestStub\bin\Release\*
# send build artifact to github output
- name: Upload Build Artifact
id: upload-build-artifact
uses: actions/upload-artifact@v4
with:
name: build-executable-artifact
path: ${{ github.workspace }}\Build_Release.zip
retention-days: 5

# upload the build artifact to the release on github
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ github.workspace }}\Build_Release.zip
asset_name: Build_Release.zip
asset_content_type: application/zip

0 comments on commit 8520c62

Please sign in to comment.