|
43 | 43 | needs: release-check |
44 | 44 | if: needs.release-check.outputs.auto-version != '' |
45 | 45 | steps: |
| 46 | + - name: Configure |
| 47 | + run: | |
| 48 | + git config --global user.email "team@dandiarchive.org" |
| 49 | + git config --global user.name "DANDI Bot" |
| 50 | +
|
46 | 51 | - name: Checkout source |
47 | 52 | uses: actions/checkout@v5 |
48 | 53 | with: |
|
66 | 71 |
|
67 | 72 | - name: Get schema version |
68 | 73 | run: | |
69 | | - SCHEMA_VERSION="$(python -c 'from dandischema.consts import DANDI_SCHEMA_VERSION; print(DANDI_SCHEMA_VERSION)')" |
70 | | - if ! echo "$SCHEMA_VERSION" | grep -qP '^\d+\.\d+\.\d+$' |
71 | | - then printf "[ERROR] Invalid schema version: '%s'\n" "$SCHEMA_VERSION" |
72 | | - exit 1 |
73 | | - fi |
74 | | - echo "SCHEMA_VERSION=$SCHEMA_VERSION" >> "$GITHUB_ENV" |
| 74 | + tools/get-schema-version # it will also check if schema version is ok |
75 | 75 |
|
76 | 76 | - name: Checkout dandi/schema |
77 | 77 | uses: actions/checkout@v5 |
@@ -118,19 +118,6 @@ jobs: |
118 | 118 |
|
119 | 119 | - name: Commit schema changes and create new tag |
120 | 120 | run: | |
121 | | - LIBRARY_VERSION="$(git -C ../dandischema describe --tags --exact-match)" |
122 | | -
|
123 | | - git config --global user.email "team@dandiarchive.org" |
124 | | - git config --global user.name "DANDI Bot" |
125 | | -
|
126 | | - git add releases |
127 | | - if ! git diff --quiet --cached |
128 | | - then git commit -m "Publish model schema v$SCHEMA_VERSION as of dandischema v$LIBRARY_VERSION" |
129 | | - git push |
130 | | - git -C ../dandischema tag -m "Schema v$SCHEMA_VERSION, released in dandischema v$LIBRARY_VERSION" schema-$SCHEMA_VERSION |
131 | | - git -C ../dandischema push --tags |
132 | | - else echo "No changes to commit" |
133 | | - fi |
134 | | - working-directory: schema |
| 121 | + tools/commit-and-push-schemata ../schema |
135 | 122 |
|
136 | 123 | # vim:set sts=2: |
0 commit comments