Merge pull request #59 from WillowInc/2024-03-26-submodule-update #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Merge DTDL | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "Ontology/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: 'true' | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Build DTDL Merger | |
run: dotnet build Tools/DTDLMerger/DTDLMerger.csproj | |
- name: Run DTDL Merger on Willow Ontology Airport DTDLv3 | |
run: dotnet run --project Tools/DTDLMerger/DTDLMerger.csproj Ontology/ > Metadata/Willow.Ontology.Airport.DTDLv3.jsonld | |
- name: Set .nuspec version | |
id: set-version | |
uses: vers-one/[email protected] | |
with: | |
files: "Metadata/*.nuspec" | |
version: bump-revision | |
- name: 'Commit new .nuspec version' | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Auto Generated" | |
git checkout -b auto/${{ steps.set-version.outputs.newVersion }} | |
git add . | |
git commit -m "Set .nuspec version to ${{ steps.set-version.outputs.newVersion }}" | |
git push --set-upstream origin auto/${{ steps.set-version.outputs.newVersion }} | |
gh pr create --title "Set .nuspec version to ${{ steps.set-version.outputs.newVersion }}" --fill | |
gh pr merge --merge --delete-branch |