Skip to content

Commit d6479bb

Browse files
CI and documentation generation adjustment (#425)
1 parent df18fe9 commit d6479bb

File tree

4 files changed

+36
-52
lines changed

4 files changed

+36
-52
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ env:
2121
CI_UTILS_FOLDER: "./aws-iot-device-sdk-python-v2/utils"
2222
CI_SAMPLES_CFG_FOLDER: "./aws-iot-device-sdk-python-v2/.github/workflows"
2323
CI_SAMPLES_FOLDER: "./aws-iot-device-sdk-python-v2/samples"
24-
CI_PUBSUB_ROLE: ${{ secrets.AWS_CI_PUBSUB_ROLE }}
25-
CI_COGNITO_ROLE: ${{ secrets.AWS_CI_COGNITO_ROLE }}
26-
CI_X509_ROLE: ${{ secrets.AWS_CI_X509_ROLE }}
27-
CI_CUSTOM_AUTHORIZER_ROLE: ${{ secrets.AWS_CI_CUSTOM_AUTHORIZER_ROLE }}
28-
CI_SHADOW_ROLE: ${{ secrets.AWS_CI_SHADOW_ROLE }}
29-
CI_JOBS_ROLE: ${{ secrets.AWS_CI_JOBS_ROLE }}
30-
CI_FLEET_PROVISIONING_ROLE: ${{ secrets.AWS_CI_FLEET_PROVISIONING_ROLE }}
31-
CI_DEVICE_ADVISOR: ${{ secrets.AWS_CI_DEVICE_ADVISOR_ROLE }}
32-
CI_MQTT5_ROLE: ${{ secrets.AWS_CI_MQTT5_ROLE }}
24+
CI_PUBSUB_ROLE: arn:aws:iam::180635532705:role/CI_PubSub_Role
25+
CI_COGNITO_ROLE: arn:aws:iam::180635532705:role/CI_Cognito_Role
26+
CI_X509_ROLE: arn:aws:iam::180635532705:role/CI_X509_Role
27+
CI_CUSTOM_AUTHORIZER_ROLE: arn:aws:iam::180635532705:role/CI_CustomAuthorizer_Role
28+
CI_SHADOW_ROLE: arn:aws:iam::180635532705:role/CI_Shadow_Role
29+
CI_JOBS_ROLE: arn:aws:iam::180635532705:role/CI_Jobs_Role
30+
CI_FLEET_PROVISIONING_ROLE: arn:aws:iam::180635532705:role/service-role/CI_FleetProvisioning_Role
31+
CI_DEVICE_ADVISOR: arn:aws:iam::180635532705:role/CI_DeviceAdvisor_Role
32+
CI_MQTT5_ROLE: arn:aws:iam::180635532705:role/CI_MQTT5_Role
3333
CI_BUILD_AND_TEST_ROLE: arn:aws:iam::180635532705:role/V2_SDK_Unit_Testing
3434

3535
jobs:

.github/workflows/docs.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,35 @@ jobs:
4242
4343
./utils/publish-release.sh "${{ github.event.inputs.release_type }}" "$Title"
4444
45+
- name: Generate documentation
46+
run: |
47+
python3 -m pip install sphinx
48+
python3 -m pip install --verbose .
49+
./make-docs.py
50+
51+
- name: Commit documentation
52+
run: |
53+
git config --local user.email "[email protected]"
54+
git config --local user.name "GitHub Action"
55+
git add --force docs/
56+
current_version=$(git describe --tags --abbrev=0)
57+
git commit --message="Update Docs: ${current_version}"
58+
59+
- name: Push generated documentation to docs branch
60+
uses: ad-m/[email protected]
61+
with:
62+
github_token: ${{ github.token }}
63+
branch: docs
64+
# Force push so that `docs` branch always looks like `main`,
65+
# but with 1 additional "update docs" commit.
66+
# This seems simpler than trying to cleanly merge `main` into
67+
# `docs` each time.
68+
force: true
69+
4570
- name: configure AWS credentials (Release)
4671
uses: aws-actions/configure-aws-credentials@v1
4772
with:
48-
role-to-assume: ${{ secrets.AWS_CI_RELEASE_ROLE }}
73+
role-to-assume: arn:aws:iam::180635532705:role/CI_V2_RELEASE_S3_ROLE
4974
aws-region: us-east-1
5075

5176
- name: "Create VERSION file and trigger release"

utils/update_semantic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def main():
4646
highest = i_version_tuple
4747
continue
4848

49-
if (highest[0] != 0 and highest[1] != 0 and highest[2] != 0):
49+
if (highest[0] != 0 or highest[1] != 0 or highest[2] != 0):
5050
print(f"v{highest[0]}.{highest[1]}.{highest[2]}")
5151
sys.exit(0)
5252
else:

0 commit comments

Comments
 (0)