-
Notifications
You must be signed in to change notification settings - Fork 7
81 lines (70 loc) · 2.22 KB
/
workflow_release.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
name: Releases
on:
workflow_dispatch:
inputs:
checkout-ref:
description: "The branch, tag or SHA to checkout. See actions/checkout 'ref'."
required: false
type: string
push:
branches: [ main ]
release:
types: [ created ]
concurrency:
group: "Releases: ${{ github.workflow }} @ ${{ inputs.checkout-ref }} ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
tests:
uses: ./.github/workflows/run_tests.yml
permissions:
checks: write
contents: read
with:
checkout-ref: ${{ inputs.checkout-ref }}
dependency-graph:
uses: ./.github/workflows/run_gradle_dependency_graph.yml
permissions:
contents: write
with:
checkout-ref: ${{ inputs.checkout-ref }}
publish-maven:
needs: tests
# only publish when manually triggered, or it's the main branch, or it's for a release
if: inputs.checkout-ref || github.ref == 'refs/heads/main' || (github.event_name == 'release' && github.event.action == 'created')
uses: ./.github/workflows/run_publish_maven.yml
secrets: inherit
permissions:
checks: write
contents: write
packages: write
with:
checkout-ref: ${{ inputs.checkout-ref }}
publish-gradle-plugin:
# only publish when manually triggered, or it's for a release
# (Gradle Plugin Portal doesn't allow snapshot versions)
if: inputs.checkout-ref || (github.event_name == 'release' && github.event.action == 'created')
uses: ./.github/workflows/run_gradle_task.yml
secrets: inherit
permissions:
contents: read
packages: write
checks: write
with:
runs-on: macos-latest
gradle-task: >-
publishPlugins
--stacktrace
checkout-ref: ${{ inputs.checkout-ref }}
publish-site:
needs: tests
# only publish when manually triggered, or it's for a release
if: inputs.checkout-ref || (github.event_name == 'release' && github.event.action == 'created')
uses: ./.github/workflows/run_publish_site.yml
permissions:
checks: write
contents: read
id-token: write
packages: write
pages: write
with:
checkout-ref: ${{ inputs.checkout-ref }}