diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7baaeb..15c4605 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,10 +14,6 @@ on: - minor - major -permissions: - contents: write - pull-requests: write - jobs: release-please: runs-on: ubuntu-latest @@ -36,13 +32,17 @@ jobs: with: node-version: '20' - - name: 🚀 Create Manual Release PR + - name: 🚀 Create Manual Release Commit if: github.event_name == 'workflow_dispatch' id: manual_release run: | npm install -g release-please npm install semver + # Configure git + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + # Get current version from manifest CURRENT_VERSION=$(cat .release-please-manifest.json | jq -r '.Website') echo "Current version: $CURRENT_VERSION" @@ -57,19 +57,46 @@ jobs: echo "Next version will be: $NEXT_VERSION" - # Create release PR with specific version - release-please release-pr \ - --repo-url="https://github.com/${{ github.repository }}" \ - --config-file=release-please-config.json \ - --manifest-file=.release-please-manifest.json \ - --release-as=$NEXT_VERSION \ - --skip-labeling \ - --token=${{ secrets.GITHUB_TOKEN }} - + # Update version in package.json + cd Website + npm version $NEXT_VERSION --no-git-tag-version + cd .. + + # Update manifest file + jq --arg version "$NEXT_VERSION" '.Website = $version' .release-please-manifest.json > temp.json && mv temp.json .release-please-manifest.json + + # Generate changelog entry + echo "## [$NEXT_VERSION] - $(date +'%Y-%m-%d')" > temp_changelog.md + echo "" >> temp_changelog.md + echo "### Changed" >> temp_changelog.md + echo "- Manual ${{ github.event.inputs.release_type }} release" >> temp_changelog.md + echo "" >> temp_changelog.md + + # Prepend to existing changelog if it exists + if [ -f "Website/CHANGELOG.md" ]; then + cat temp_changelog.md Website/CHANGELOG.md > temp_full_changelog.md + mv temp_full_changelog.md Website/CHANGELOG.md + else + mv temp_changelog.md Website/CHANGELOG.md + fi + + # Commit and push changes + git add . + git commit -m "chore(release): release $NEXT_VERSION + + Release type: ${{ github.event.inputs.release_type }} + Previous version: $CURRENT_VERSION + New version: $NEXT_VERSION" + + git push origin HEAD + echo "releases_created=true" >> $GITHUB_OUTPUT + echo "version=$NEXT_VERSION" >> $GITHUB_OUTPUT - name: 📝 Manual Release Summary if: github.event_name == 'workflow_dispatch' run: | - echo "✅ Manual release PR created with type: ${{ github.event.inputs.release_type }}" - echo "🔍 Check the Pull Requests tab for the release PR to review and merge." + echo "✅ Manual release commit created with type: ${{ github.event.inputs.release_type }}" + echo "🏷️ New version: ${{ steps.manual_release.outputs.version }}" + echo "📝 Changes have been committed and pushed to the current branch." + echo "🔗 View the commit: https://github.com/${{ github.repository }}/commit/$(git rev-parse HEAD)" diff --git a/Generator/MetadataExtensions.cs b/Generator/MetadataExtensions.cs index 03ec00a..3577e4d 100644 --- a/Generator/MetadataExtensions.cs +++ b/Generator/MetadataExtensions.cs @@ -58,11 +58,13 @@ private static bool StandardDescriptionHasChanged(this IEnumerable<(string Logic return EnglishDefaultFields.Concat(new[] { ("statuscode", "Status Reason", $"Reason for the status of the {entityDisplayName}"), ("statecode", "Status Reason", $"Status of the {entityDisplayName}"), + ("organizationid", "Organization", $"Unique identifier of the organization associated with the {entityDisplayName}."), }); default: return EnglishDefaultFields.Concat(new[] { ("statuscode", "Status Reason", $"Reason for the status of the {entityDisplayName}"), ("statecode", "Status Reason", $"Status of the {entityDisplayName}"), + ("organizationid", "Organization", $"Unique identifier of the organization associated with the {entityDisplayName}."), }); ; } } @@ -225,6 +227,7 @@ private static bool StandardDescriptionHasChanged(this IEnumerable<(string Logic ( "utcconversiontimezonecode", "Tidszonekode til UTC-konvertering", "Den tidszonekode, der var i brug ved oprettelse af posten." ), ( "utcconversiontimezonecode", "Tidszonekode for UTC-konvertering", "Den tidszonekode, der var i brug ved oprettelse af posten." ), ( "versionnumber", "Versionsnummer", "Versionsnummer" ), - ( "versionnumber", "Versionsnummer", "Versionsnummer for aktiviteten." ) + ( "versionnumber", "Versionsnummer", "Versionsnummer for aktiviteten." ), + ( "organizationid", "Organisations-id", "Entydigt id for organisationen" ), }; } diff --git a/Website/components/attributes/BooleanAttribute.tsx b/Website/components/attributes/BooleanAttribute.tsx index 43cace7..6570bb1 100644 --- a/Website/components/attributes/BooleanAttribute.tsx +++ b/Website/components/attributes/BooleanAttribute.tsx @@ -1,45 +1,49 @@ +import { useIsMobile } from "@/hooks/use-mobile"; import { BooleanAttributeType } from "@/lib/Types" import { CheckCircle, Circle } from "lucide-react" export default function BooleanAttribute({ attribute }: { attribute: BooleanAttributeType }) { + + const isMobile = useIsMobile(); + return (
{attribute.Type} ({formatNumber(attribute.MinValue)} to {formatNumber(attribute.MaxValue)})
-Precision: {attribute.Precision}
+{attribute.Type} ({formatNumber(attribute.MinValue)} to {formatNumber(attribute.MaxValue)})
+Precision: {attribute.Precision}
> } diff --git a/Website/components/attributes/FileAttribute.tsx b/Website/components/attributes/FileAttribute.tsx index 2afee50..39ba278 100644 --- a/Website/components/attributes/FileAttribute.tsx +++ b/Website/components/attributes/FileAttribute.tsx @@ -2,5 +2,5 @@ import { FileAttributeType } from "@/lib/Types"; import { formatNumberSeperator } from "@/lib/utils"; export default function FileAttribute({ attribute } : { attribute: FileAttributeType }) { - return <>File (Max {formatNumberSeperator(attribute.MaxSize)}KB)> + return <>File (Max {formatNumberSeperator(attribute.MaxSize)}KB)> } \ No newline at end of file diff --git a/Website/components/attributes/GenericAttribute.tsx b/Website/components/attributes/GenericAttribute.tsx index b94090e..d0e0db1 100644 --- a/Website/components/attributes/GenericAttribute.tsx +++ b/Website/components/attributes/GenericAttribute.tsx @@ -1,5 +1,5 @@ import { GenericAttributeType } from "@/lib/Types"; export default function GenericAttribute({ attribute } : { attribute: GenericAttributeType }) { - return {attribute.Type} + return {attribute.Type} } \ No newline at end of file diff --git a/Website/components/attributes/IntegerAttribute.tsx b/Website/components/attributes/IntegerAttribute.tsx index a5a8ea5..8c72f40 100644 --- a/Website/components/attributes/IntegerAttribute.tsx +++ b/Website/components/attributes/IntegerAttribute.tsx @@ -2,7 +2,7 @@ import { IntegerAttributeType } from "@/lib/Types" import { formatNumberSeperator } from "@/lib/utils" export default function IntegerAttribute({ attribute } : { attribute: IntegerAttributeType }) { - return <>{attribute.Format} ({FormatNumber(attribute.MinValue)} to {FormatNumber(attribute.MaxValue)})> + return <>{attribute.Format} ({FormatNumber(attribute.MinValue)} to {FormatNumber(attribute.MaxValue)})> } function FormatNumber(number: number) { diff --git a/Website/components/attributes/LookupAttribute.tsx b/Website/components/attributes/LookupAttribute.tsx index 54d53c4..4ac5f5d 100644 --- a/Website/components/attributes/LookupAttribute.tsx +++ b/Website/components/attributes/LookupAttribute.tsx @@ -6,26 +6,26 @@ export default function LookupAttribute({ attribute }: { attribute: LookupAttrib const { scrollToSection } = useDatamodelView(); - return <> -Lookup
-Lookup
+{group.Entities.length}