Added Workflows for automated builds to project
This commit is contained in:
parent
724c410f36
commit
0a4e2477f9
38
.github/workflows/build-push.yml
vendored
Normal file
38
.github/workflows/build-push.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Build Project
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
# Filter for issue number 1
|
||||
issues:
|
||||
- 1
|
||||
|
||||
jobs:
|
||||
build-release:
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
|
||||
#Check out the code from the repository
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
#Verify installed .NET Framework version (Optional Debug Step)
|
||||
- name: Check .NET Framework version
|
||||
run: |
|
||||
reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" /v Release
|
||||
|
||||
#Restore NuGet packages
|
||||
- name: Restore NuGet packages
|
||||
run: nuget restore TeamsNetphoneLink.sln
|
||||
|
||||
#Build the project
|
||||
- name: Build the solution
|
||||
run: msbuild TeamsNetphoneLink.sln /p:Configuration=Release /t:Rebuild
|
||||
|
||||
#Upload the build artifact
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-artifact
|
||||
path: build/Release/net8.0-windows/**
|
65
.github/workflows/build-release.yml
vendored
Normal file
65
.github/workflows/build-release.yml
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
name: Build and Relase
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
jobs:
|
||||
build-release:
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
|
||||
#Check out the code from the repository
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
#Verify installed .NET Framework version (Optional Debug Step)
|
||||
- name: Check .NET Framework version
|
||||
run: |
|
||||
reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" /v Release
|
||||
|
||||
#Restore NuGet packages
|
||||
- name: Restore NuGet packages
|
||||
run: nuget restore TeamsNetphoneLink.sln
|
||||
|
||||
#Build the project
|
||||
- name: Build the solution
|
||||
run: msbuild TeamsNetphoneLink.sln /p:Configuration=Release /p:Version=${{github.ref_name}} /t:Rebuild
|
||||
|
||||
#Upload the build artifact
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-artifact
|
||||
path: build/Release/net8.0-windows/**
|
||||
|
||||
create-release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
#Checkout repository to access release-related metadata
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
#Download the build artifact
|
||||
- name: Download build artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-artifact
|
||||
path: ${{ github.workspace }}/artifact
|
||||
|
||||
- name: Archive Release
|
||||
run: (cd ${{ github.workspace }}/artifact && zip -r ${{ github.workspace }}/artifact/NetphoneTeamsLink${{github.ref_name}}.zip .)
|
||||
|
||||
- name: Release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
name: "Netphone Teams Link ${{github.ref_name}}"
|
||||
files: |-
|
||||
${{ github.workspace }}/artifact/NetphoneTeamsLink${{github.ref_name}}.zip
|
||||
token: '${{secrets.KRJAN02_RELEASE_TOKEN}}'
|
||||
tag_name: ${{github.ref_name}}
|
Loading…
Reference in New Issue
Block a user