-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.52 KB
/
publish.yml
File metadata and controls
55 lines (53 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Publish Library to GAR
on:
workflow_dispatch:
inputs:
tag:
description: 'Enter a valid tag for the release'
required: true
type: string
workflow_call:
inputs:
tag:
required: true
type: string
secrets:
BROADBOT_TOKEN:
required: true
ARTIFACTORY_USERNAME:
required: true
ARTIFACTORY_PASSWORD:
required: true
env:
SERVICE_NAME: ${{ github.event.repository.name }}
GOOGLE_PROJECT: broad-dsp-gcr-public
jobs:
publish-job:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v6
with:
ref: ${{ inputs.tag }}
token: ${{ secrets.BROADBOT_TOKEN }}
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Authenticate to GCP
uses: google-github-actions/auth@v3
with:
token_format: access_token
workload_identity_provider: 'projects/1038484894585/locations/global/workloadIdentityPools/github-wi-pool/providers/github-wi-provider'
service_account: 'dsp-artifact-registry-push@dsp-artifact-registry.iam.gserviceaccount.com'
- name: Publish client to GAR
run: ./gradlew publish
env:
GOOGLE_CLOUD_PROJECT: dsp-artifact-registry
GAR_LOCATION: us-central1
GAR_REPOSITORY_ID: libs-release-standard