Skip to content

- added preconfigs.user.json #67

- added preconfigs.user.json

- added preconfigs.user.json #67

Workflow file for this run

name: Our.Umbraco.Iconic - Release
on:
push:
branches: [ 'release/*' ]
env:
SOLUTION: Iconic.sln
PLUGIN_PROJECT: Our.Iconic/Our.Iconic.csproj
CORE_PROJECT: Our.Iconic.Core/Our.Iconic.Core.csproj
OUTPUT_PATH: ${{ github.workspace }}/build.out
jobs:
publish-nuget:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Release Version
id: package_version
uses: KageKirin/[email protected]
with:
file: ${{ env.PLUGIN_PROJECT }}
regex: ^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
- name: Check Version v${{ steps.package_version.outputs.version }} Pre-Release state
id: check_prerelease
run: |
if [[ ${{ steps.package_version.outputs.version }} =~ ^[0-9]+\.[0-9]+\.[0-9]+-.+$ ]]; then
echo Pre-Release detected
echo ::set-output name=prerelease::true
else
echo Pre-Release NOT detected
echo ::set-output name=prerelease::false
fi
- name: Setup .NET Core SDK 7.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x
- name: Restore dependencies
run: dotnet restore
- run: dotnet build --configuration Release
- name: Create Nuget Packages
run: dotnet pack --configuration Release -o ${{ env.OUTPUT_PATH }}
- name: Publish to NuGet
working-directory: ${{ env.OUTPUT_PATH }}
run: dotnet nuget push *.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
- uses: avakar/tag-and-release@v1
name: Create Release Tag v${{ steps.package_version.outputs.version }}
id: release
with:
tag_name: v${{ steps.package_version.outputs.version }}
prerelease: ${{ steps.check_prerelease.outputs.prerelease }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release information for v${{ steps.package_version.outputs.version }}
run: |
echo Release Id: ${{ steps.release.outputs.id }}
echo Upload URL: ${{ steps.release.outputs.upload_url }}
echo Release URL: ${{ steps.release.outputs.html_url }}