Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ImaterialC committed Dec 13, 2022
2 parents 13f2e48 + acdf9fd commit 770e193
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
name: Create new release
on: workflow_dispatch
on:
workflow_dispatch:
inputs:
name:
description: "Custom release name"
default: ""
required: false
type: string
version:
description: "Custom tag name"
default: ""
required: false
type: string
defaults:
run:
shell: pwsh
Expand All @@ -17,6 +29,20 @@ jobs:

- name: Preparing
run: |
$TodayDate = Get-Date -Format 'yyyyMMdd'
echo "TODAY_DATE=$TodayDate" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
if ( "${{ inputs.name }}" ) {
echo "RELEASE_NAME=${{ inputs.name }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
}
else {
echo "RELEASE_NAME=Pricone UI EN DMM v$(Get-Date -Format 'yyyy.MM.dd')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
}
if ( "${{ inputs.version }}" ) {
echo "RELEASE_TAG=${{ inputs.version }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
}
else {
echo "RELEASE_TAG=$TodayDate" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
}
mkdir newrelease
- name: Downloading core files
Expand Down Expand Up @@ -51,10 +77,7 @@ jobs:
- name: Generating version files
run: |
$TodayDate = (Get-Date -Format "yyyy.MM.dd")
$TodayDate | Out-File -FilePath "newrelease/Version.txt" -Encoding utf8 -Append
echo "TODAY_DATE=$TodayDate" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "RELEASE_VERSION=$(Get-Date -Format 'yyyyMMdd')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
"${{ env.TODAY_DATE }}" | Out-File -FilePath "newrelease/Version.txt" -Encoding utf8
- name: Generating changelog
id: changelog
Expand All @@ -77,8 +100,9 @@ jobs:
- name: Publish Release
uses: ncipollo/release-action@v1
with:
name: ${{ env.RELEASE_NAME }}
body: ${{ steps.changelog.outputs.changes }}
tag: ${{ env.RELEASE_VERSION }}
tag: ${{ env.RELEASE_TAG }}
artifacts:
"./PriconneTL_${{ env.TODAY_DATE }}.zip"

Expand Down

0 comments on commit 770e193

Please sign in to comment.