Skip to content

honeybee_schema_dotnet_release #190

honeybee_schema_dotnet_release

honeybee_schema_dotnet_release #190

name: CI
on: repository_dispatch
jobs:
updateImage:
name: "Check Event"
runs-on: ubuntu-latest
if: github.event.action == 'dragonfly_schema_release'
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v4
with:
ref: refs/heads/master
token: ${{ secrets.GH_TOKEN }}
submodules: recursive
- name: Set up npm
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: "Run Update Script"
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
cd ./.generator/SchemaGenerator
dotnet run --download --genCsModel --genCsInterface --genTsModel --updateVersion
- name: "Set Commit Message"
id: vars
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
echo ::set-output name=commit_message::"Update Schema to $VERSION"
- name: "Commit and Push Changes"
id: push
env:
COMMIT_MESSAGE: ${{ steps.vars.outputs.commit_message }}
run: |
git config --global user.name 'ladybugbot'
git config --global user.email '[email protected]'
git add .
git commit -m "$COMMIT_MESSAGE"
git push
bump_honeybee_schema_dotnet:
name: "Check Event"
runs-on: ubuntu-latest
if: github.event.action == 'honeybee_schema_dotnet_release'
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v4
with:
ref: refs/heads/master
token: ${{ secrets.DEPS_UPDATING }}
- name: "Run Update Script"
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
sed -i --regexp-extended 's/(Include="HoneybeeSchema" Version=").*(")/Include="HoneybeeSchema" Version="'"$VERSION"'"/' src/DragonflySchema/DragonflySchema.csproj
- name: "Commit and Push Changes"
id: push
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
git config --global user.name 'ladybugbot'
git config --global user.email '[email protected]'
git add .
git commit -m "fix(deps): Bump honeybee-schema to $VERSION"
git push