Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jar publication #38

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ jobs:
if: "contains(github.event.head_commit.message, '[release]') && github.event.ref=='refs/heads/master'"
needs: [ build ]
runs-on: ubuntu-latest
permissions:
id-token: write # Required to authenticate to AWS using assume-role
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -92,3 +95,14 @@ jobs:
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.VERSION }}

- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::128997144437:role/Development

- name: Publish STABLE jars
run: ./gradlew publish


6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ application {

ext.aws_access_key_id = project.findProperty('aws_access_key_id') ?: System.getenv('AWS_ACCESS_KEY_ID')
ext.aws_secret_access_key = project.findProperty('aws_secret_access_key') ?: System.getenv('AWS_SECRET_ACCESS_KEY')
ext.aws_session_token = project.findProperty('aws_session_token') ?: System.getenv('AWS_SESSION_TOKEN')
ext.publishRepoUrl = project.findProperty('publish_repo_url') ?: System.getenv('PUBLISH_REPO_URL') ?: ( version.endsWith('-SNAPSHOT') ? "s3://maven.seqera.io/snapshots" : "s3://maven.seqera.io/releases" )

// Add sources to JARs.
Expand All @@ -100,8 +101,9 @@ publishing {
url = publishRepoUrl
credentials(AwsCredentials) {
// keys are defined in the `gradle.properties` file
accessKey aws_access_key_id
secretKey aws_secret_access_key
accessKey(aws_access_key_id)
secretKey(aws_secret_access_key)
if(aws_session_token) { sessionToken(aws_session_token) }
}
}
}
Expand Down
Loading