-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (90 loc) · 2.81 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Publish
on:
workflow_dispatch:
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: gradle
- uses: docker/setup-buildx-action@v3
- name: Run Bootstrap
run: ./bootstrap.sh
- name: Run Gradle Check
run: ./gradlew check
validate-release:
name: Validate Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Changelog
uses: denisa/clq-action@v1
id: changelog
with:
changeMap: .github/clq/changemap.json
mode: release
- name: Validate Tag
uses: denisa/semantic-tag-helper@v1
with:
mode: test
tag: ${{ steps.changelog.outputs.tag }}
publish:
if: github.repository == 'codebandits/gradle-container-plugin'
needs: [ check, validate-release ]
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Get Changelog
uses: denisa/clq-action@v1
id: changelog
with:
changeMap: .github/clq/changemap.json
mode: release
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: gradle
- 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: Install SOPS
uses: mdgreenwald/mozilla-sops-action@v1
- name: Run Bootstrap
run: ./bootstrap.sh
- name: Get Changelog
uses: denisa/clq-action@v1
id: changelog
with:
changeMap: .github/clq/changemap.json
mode: release
- name: Publish Plugin
run: ./gradlew publishPlugins -Pversion=${{ steps.changelog.outputs.version }} --validate-only
# - name: Set Tag
# uses: denisa/semantic-tag-helper@v1
# with:
# mode: set
# tag: ${{ steps.changelog.outputs.tag }}
#
# - name: Create Release
# uses: ncipollo/release-action@v1
# with:
# tag: ${{ steps.changelog.outputs.tag }}
# prerelease: ${{ steps.changelog.outputs.status == 'prereleased' }}
# name: ${{ steps.changelog.outputs.version }}
# body: ${{ steps.changelog.outputs.changes }}