Auto release
This commit is contained in:
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@@ -20,6 +20,11 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
create_release:
|
||||||
|
description: 'Create release'
|
||||||
|
required: true
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -67,6 +72,31 @@ jobs:
|
|||||||
} else {
|
} else {
|
||||||
Write-Host "ChromeHeadlessShell not found in published output"
|
Write-Host "ChromeHeadlessShell not found in published output"
|
||||||
}
|
}
|
||||||
|
- name: Get previous tag
|
||||||
|
if: ${{ github.event.inputs.create_release != 'false' }}
|
||||||
|
id: previoustag
|
||||||
|
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get next minor version
|
||||||
|
if: ${{ github.event.inputs.create_release != 'false' }}
|
||||||
|
id: semver
|
||||||
|
uses: 'WyriHaximus/github-action-next-semvers@v1'
|
||||||
|
with:
|
||||||
|
version: ${{ steps.previoustag.outputs.tag }}
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
if: ${{ github.event.inputs.create_release != 'false' }}
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.semver.outputs.patch }}
|
||||||
|
release_name: Release ${{ steps.semver.outputs.patch }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
- name: Generate appsettings.json
|
- name: Generate appsettings.json
|
||||||
run: |
|
run: |
|
||||||
@@ -180,7 +210,7 @@ jobs:
|
|||||||
Copy-Item -Path ".\output\dotnet\*" -Destination "C:\inetpub\applications\HomeApi" -Recurse -Force
|
Copy-Item -Path ".\output\dotnet\*" -Destination "C:\inetpub\applications\HomeApi" -Recurse -Force
|
||||||
Write-Host "Files copied successfully"
|
Write-Host "Files copied successfully"
|
||||||
|
|
||||||
- name: Start IIS Application Pool
|
- name: Restart IIS Application Pool
|
||||||
if: ${{ github.event.inputs.restart_iis != 'false' }}
|
if: ${{ github.event.inputs.restart_iis != 'false' }}
|
||||||
run: |
|
run: |
|
||||||
Import-Module WebAdministration
|
Import-Module WebAdministration
|
||||||
|
|||||||
Reference in New Issue
Block a user