diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1891cfe..0feeeb24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,15 +21,15 @@ env: CI_UTILS_FOLDER: "./aws-iot-device-sdk-python-v2/utils" CI_SAMPLES_CFG_FOLDER: "./aws-iot-device-sdk-python-v2/.github/workflows" CI_SAMPLES_FOLDER: "./aws-iot-device-sdk-python-v2/samples" - CI_PUBSUB_ROLE: ${{ secrets.AWS_CI_PUBSUB_ROLE }} - CI_COGNITO_ROLE: ${{ secrets.AWS_CI_COGNITO_ROLE }} - CI_X509_ROLE: ${{ secrets.AWS_CI_X509_ROLE }} - CI_CUSTOM_AUTHORIZER_ROLE: ${{ secrets.AWS_CI_CUSTOM_AUTHORIZER_ROLE }} - CI_SHADOW_ROLE: ${{ secrets.AWS_CI_SHADOW_ROLE }} - CI_JOBS_ROLE: ${{ secrets.AWS_CI_JOBS_ROLE }} - CI_FLEET_PROVISIONING_ROLE: ${{ secrets.AWS_CI_FLEET_PROVISIONING_ROLE }} - CI_DEVICE_ADVISOR: ${{ secrets.AWS_CI_DEVICE_ADVISOR_ROLE }} - CI_MQTT5_ROLE: ${{ secrets.AWS_CI_MQTT5_ROLE }} + CI_PUBSUB_ROLE: arn:aws:iam::180635532705:role/CI_PubSub_Role + CI_COGNITO_ROLE: arn:aws:iam::180635532705:role/CI_Cognito_Role + CI_X509_ROLE: arn:aws:iam::180635532705:role/CI_X509_Role + CI_CUSTOM_AUTHORIZER_ROLE: arn:aws:iam::180635532705:role/CI_CustomAuthorizer_Role + CI_SHADOW_ROLE: arn:aws:iam::180635532705:role/CI_Shadow_Role + CI_JOBS_ROLE: arn:aws:iam::180635532705:role/CI_Jobs_Role + CI_FLEET_PROVISIONING_ROLE: arn:aws:iam::180635532705:role/service-role/CI_FleetProvisioning_Role + CI_DEVICE_ADVISOR: arn:aws:iam::180635532705:role/CI_DeviceAdvisor_Role + CI_MQTT5_ROLE: arn:aws:iam::180635532705:role/CI_MQTT5_Role CI_BUILD_AND_TEST_ROLE: arn:aws:iam::180635532705:role/V2_SDK_Unit_Testing jobs: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 0a716dd4..00000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Update the API documentation whenever the `main` branch changes. -# This documentation lives in its own `docs` branch. -name: docs - -on: - push: - branches: - - 'main' - -jobs: - update-docs-branch: - runs-on: ubuntu-20.04 # latest - permissions: - contents: write # allow push - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Update docs branch - run: | - python3 -m pip install sphinx - python3 -m pip install --verbose . - ./make-docs.py - - - name: Commit - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add --force docs/ - git commit --message="update docs" - - - name: Push to docs branch - uses: ad-m/github-push-action@v0.6.0 - with: - github_token: ${{ github.token }} - branch: docs - # Force push so that `docs` branch always looks like `main`, - # but with 1 additional "update docs" commit. - # This seems simpler than trying to cleanly merge `main` into - # `docs` each time. - force: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 305d9ca7..6622d18b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,10 +42,35 @@ jobs: ./utils/publish-release.sh "${{ github.event.inputs.release_type }}" "$Title" + - name: Generate documentation + run: | + python3 -m pip install sphinx + python3 -m pip install --verbose . + ./make-docs.py + + - name: Commit documentation + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add --force docs/ + current_version=$(git describe --tags --abbrev=0) + git commit --message="Update Docs: ${current_version}" + + - name: Push generated documentation to docs branch + uses: ad-m/github-push-action@v0.6.0 + with: + github_token: ${{ github.token }} + branch: docs + # Force push so that `docs` branch always looks like `main`, + # but with 1 additional "update docs" commit. + # This seems simpler than trying to cleanly merge `main` into + # `docs` each time. + force: true + - name: configure AWS credentials (Release) uses: aws-actions/configure-aws-credentials@v1 with: - role-to-assume: ${{ secrets.AWS_CI_RELEASE_ROLE }} + role-to-assume: arn:aws:iam::180635532705:role/CI_V2_RELEASE_S3_ROLE aws-region: us-east-1 - name: "Create VERSION file and trigger release" diff --git a/utils/update_semantic_version.py b/utils/update_semantic_version.py index 78f46e3f..39ca9373 100644 --- a/utils/update_semantic_version.py +++ b/utils/update_semantic_version.py @@ -46,7 +46,7 @@ def main(): highest = i_version_tuple continue - if (highest[0] != 0 and highest[1] != 0 and highest[2] != 0): + if (highest[0] != 0 or highest[1] != 0 or highest[2] != 0): print(f"v{highest[0]}.{highest[1]}.{highest[2]}") sys.exit(0) else: