## Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. ## SPDX-License-Identifier: Apache-2.0 version: 0.2 env: variables: BRANCH: "main" git-credential-helper: yes secrets-manager: GH_TOKEN: Github/crypto-compute-ci-bot:C3R Release Token phases: pre_build: commands: # get new project version - git checkout $BRANCH - export VERSION=$(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*\(.*\)<\/version>/\1/p') - git config --global user.name "crypto-compute-ci-bot" - git config --global user.email "no-reply@noemail.local" - echo $GH_TOKEN > token.txt - export GH_TOKEN= # install gh cli in order to upload artifacts - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null - apt update - apt install gh build: commands: - gh version - gh auth login --with-token < token.txt - gh auth status - | mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \ -DrepoUrl=https://aws.oss.sonatype.org \ -Dartifact=com.amazonaws:c3r-sdk-core:${VERSION}:jar - | mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \ -DrepoUrl=https://aws.oss.sonatype.org \ -Dartifact=com.amazonaws:c3r-sdk-core:${VERSION}:jar:sources - | mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \ -DrepoUrl=https://aws.oss.sonatype.org \ -Dartifact=com.amazonaws:c3r-sdk-core:${VERSION}:jar:javadoc - gh release create v${VERSION} ~/.m2/repository/com/amazonaws/c3r-sdk-core/${VERSION}/*.jar -d -F CHANGELOG.md -t "Cryptographic Computing for Clean Rooms SDK ${VERSION} Release -- $(date +%Y-%m-%d)"