-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.29 KB
/
publish.yml
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
name: Publish
on:
push:
tags:
- 'v*'
jobs:
publish:
if: github.repository == 'codebandits/gradle-container-plugin'
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Install SOPS
uses: mdgreenwald/mozilla-sops-action@v1
- name: Load Infrastructure Configuration
uses: codebandits/github-actions/load-env@main
id: configuration
with:
path: ./.github/configuration.env
- uses: google-github-actions/auth@v2
with:
project_id: ${{ steps.configuration.outputs.GCP_PROJECT_ID }}
workload_identity_provider: ${{ steps.configuration.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ steps.configuration.outputs.GCP_SERVICE_ACCOUNT }}
- name: Set Version
run: |
TAG="${{ github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Run Bootstrap
run: ./bootstrap.sh
- name: Publish Plugin
run: ./gradlew publishPlugins -Pversion=$VERSION --validate-only