Skip to content

Commit

Permalink
Merge pull request #1 from jcdcdev/dev
Browse files Browse the repository at this point in the history
First Release
  • Loading branch information
jcdcdev authored Aug 25, 2023
2 parents 57df902 + 0b87b77 commit 3bfea9f
Show file tree
Hide file tree
Showing 25 changed files with 1,474 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contributing Guidelines

Contributions to this package are most welcome!

There is a test site in the solution to make working with this repository easier.
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Bug report"
description: "File a bug report to help improve this package."
labels: "bug"
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report this issue as thoroughly as possible.
- type: input
id: "PackageVersion"
attributes:
label: "Which jcdcdev.Umbraco.Core version are you using?"
description: "Leave blank if you're not sure: the latest version will be assumed."
validations:
required: false
- type: input
id: "umbracoVersion"
attributes:
label: "Which Umbraco version are you using? For example: 10.4.0 - don't just write v10"
description: "Use the help icon in the Umbraco backoffice to find the version you're using."
validations:
required: true
- type: textarea
id: "summary"
attributes:
label: "Bug summary"
description: "Write a summary of the bug."
description: "Remember that you can format code and logs nicely with the `<>` button"
placeholder: >
Try to pinpoint it as much as possible.
Try to state the actual problem, and not just what you think the solution might be.
validations:
required: true
- type: textarea
attributes:
label: "Steps to reproduce"
id: "reproduction"
description: "How can we reproduce the problem on a clean AdminOnlyPackage + Umbraco install?"
placeholder: >
Please include any links, screenshots, stack-traces, etc.
validations:
required: true
- type: textarea
attributes:
label: "Expected result / actual result"
id: "result"
description: "What did you expect that would happen on your Umbraco site and what is the actual result of the above steps?"
placeholder: >
Describe the intended/desired outcome after you did the steps mentioned.
Describe the behaviour of the bug
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Feature request"
description: "Suggest an idea for this package."
labels: "enhancement"
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to suggest this feature request!
- type: textarea
id: "summary"
attributes:
label: "Feature summary"
description: "Write a brief summary of the feature"
validations:
required: true
- type: textarea
id: "details"
attributes:
label: "Additional details"
description: "Provide any additional details or comments about the feature you are suggesting"
validations:
required: false
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build Package

on:
pull_request:
branches: "*"
jobs:
build:

runs-on: windows-latest

steps:

- name: Checkout repository
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x

- name: Build project
run: dotnet build src\jcdcdev.Umbraco.Core\jcdcdev.Umbraco.Core.csproj --configuration Release
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release Package
run-name: >
push NuGet ${{ github.repository}} #${{ github.run_number }}
on:
pull_request:
branches:
- main
types: [closed]
workflow_dispatch:
jobs:
determine-version:
runs-on: ubuntu-latest
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'
- name: Determine Version
id: gitversion # id to later be referenced
uses: gittools/actions/gitversion/execute@v0
build:
name: push ${{ needs.determine-version.outputs.semVer }}
runs-on: windows-latest
needs: determine-version
env:
SEMVER: ${{ needs.determine-version.outputs.semVer }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Build project
run: dotnet build src\jcdcdev.Umbraco.Core\jcdcdev.Umbraco.Core.csproj --configuration Release -p:Version=${{ env.SEMVER }}

- name: Pack
run: dotnet pack src\jcdcdev.Umbraco.Core\jcdcdev.Umbraco.Core.csproj --configuration Release -p:Version=${{ env.SEMVER }} --no-build --output .

- name: Push to NuGet
run: dotnet nuget push **\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
post-deploy:
runs-on: ubuntu-latest
needs:
- determine-version
- build
env:
SEMVER: ${{ needs.determine-version.outputs.semVer }}
name: post-deploy ${{ needs.determine-version.outputs.semVer }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Tag commit
env:
TAG: ${{ env.SEMVER }}
MESSAGE: ""
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a "${TAG}" -m "${MESSAGE}"
git push origin "${TAG}"
Loading

0 comments on commit 3bfea9f

Please sign in to comment.