diff --git a/.github/workflows/boardReleaseLive.yaml b/.github/workflows/boardReleaseLive.yaml index a07935a35..a104a4174 100644 --- a/.github/workflows/boardReleaseLive.yaml +++ b/.github/workflows/boardReleaseLive.yaml @@ -9,7 +9,7 @@ on: default: "new-feature/boards/1" jobs: - index_boards: + upload_board_assets_live: runs-on: ubuntu-latest permissions: pull-requests: write diff --git a/.github/workflows/boardReleaseTest.yaml b/.github/workflows/boardReleaseTest.yaml index 840e65549..9288b03f2 100644 --- a/.github/workflows/boardReleaseTest.yaml +++ b/.github/workflows/boardReleaseTest.yaml @@ -9,7 +9,7 @@ on: default: "new-feature/boards/1" jobs: - index_boards: + upload_board_assets_dev: runs-on: ubuntu-latest permissions: pull-requests: write @@ -47,11 +47,19 @@ jobs: pip install packaging sudo apt-get install p7zip-full + - name: Update Changelogs + id: changelog_update + run: | + python -u scripts/update_board_changelog.py + sdk_tag=$(> $GITHUB_OUTPUT + python -u scripts/log_changes.py + - name: Upload Board Asset run: | - if [[ ${{ steps.changelog_update.outputs.sdk_tag_name }} != "mikroSDK-0" ]]; then - python -u scripts/package.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ steps.changelog_update.outputs.sdk_tag_name }} "False" - fi + python -u scripts/package.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ steps.changelog_update.outputs.sdk_tag_name }} "False" - name: Run Index Script env: @@ -60,25 +68,21 @@ jobs: ES_PASSWORD: ${{ secrets.ES_PASSWORD }} MIKROE_NECTO_AWS: ${{ secrets.MIKROE_NECTO_AWS }} run: | - if [[ ${{ steps.changelog_update.outputs.sdk_tag_name }} != "mikroSDK-0" ]]; then - echo "Indexing to Test." - python -u scripts/index.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ steps.changelog_update.outputs.sdk_tag_name }} ${{ secrets.ES_INDEX_TEST }} - fi + echo "Indexing to Test." + python -u scripts/index.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ steps.changelog_update.outputs.sdk_tag_name }} ${{ secrets.ES_INDEX_TEST }} - name: Trigger database update in Core repo run: | - if [[ ${{ steps.changelog_update.outputs.sdk_tag_name }} != "mikroSDK-0" ]]; then - # Set the required variables - repo_owner="MikroElektronika" - repo_name="core_packages" - event_type="trigger-workflow" - version="${{ github.event.inputs.release_version }}" + # Set the required variables + repo_owner="MikroElektronika" + repo_name="core_packages" + event_type="trigger-workflow" + version="${{ github.event.inputs.release_version }}" - curl -L \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.MIKROE_ACTIONS_KEY }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/$repo_owner/$repo_name/dispatches \ - -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"version\": \"$version\", \"index\": \"Test\", \"unit\": false, \"integration\": true}}" - fi + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.MIKROE_ACTIONS_KEY }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/$repo_owner/$repo_name/dispatches \ + -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"version\": \"$version\", \"index\": \"Test\", \"unit\": false, \"integration\": true}}"