Skip to content

Commit 7b8ed50

Browse files
committed
Move publishing out of CirclCI and into github actions.
1 parent 69ac7f4 commit 7b8ed50

File tree

2 files changed

+63
-68
lines changed

2 files changed

+63
-68
lines changed

.circleci/config.yml

-68
Original file line numberDiff line numberDiff line change
@@ -140,52 +140,6 @@ jobs:
140140
path: lib-extra/build/test-results/test
141141
- store_test_results:
142142
path: plugin-gradle/build/test-results/test
143-
do_release_all:
144-
<< : *env_gradle
145-
steps:
146-
- checkout
147-
- *restore_cache_wrapper
148-
- *restore_cache_deps
149-
- *set_git_origin_to_https
150-
- run:
151-
name: gradlew :changelogPush
152-
command: ./gradlew :changelogPush -Prelease=true --stacktrace --warning-mode all
153-
- run:
154-
name: gradlew :plugin-gradle:changelogPush
155-
command: ./gradlew :plugin-gradle:changelogPush -Prelease=true -Pgradle.publish.key=${gradle_key} -Pgradle.publish.secret=${gradle_secret} --stacktrace --warning-mode all
156-
- run:
157-
name: gradlew :plugin-maven:changelogPush
158-
command: ./gradlew :plugin-maven:changelogPush -Prelease=true --stacktrace --warning-mode all
159-
do_release_lib:
160-
<< : *env_gradle
161-
steps:
162-
- checkout
163-
- *restore_cache_wrapper
164-
- *restore_cache_deps
165-
- *set_git_origin_to_https
166-
- run:
167-
name: gradlew :changelogPush
168-
command: ./gradlew :changelogPush -Prelease=true --stacktrace --warning-mode all
169-
do_release_plugin_gradle:
170-
<< : *env_gradle
171-
steps:
172-
- checkout
173-
- *restore_cache_wrapper
174-
- *restore_cache_deps
175-
- *set_git_origin_to_https
176-
- run:
177-
name: gradlew :plugin-gradle:changelogPush
178-
command: ./gradlew :plugin-gradle:changelogPush -Prelease=true -Pgradle.publish.key=${gradle_key} -Pgradle.publish.secret=${gradle_secret} --stacktrace
179-
do_release_plugin_maven:
180-
<< : *env_gradle
181-
steps:
182-
- checkout
183-
- *restore_cache_wrapper
184-
- *restore_cache_deps
185-
- *set_git_origin_to_https
186-
- run:
187-
name: gradlew :plugin-maven:changelogPush
188-
command: ./gradlew :plugin-maven:changelogPush -Prelease=true --stacktrace
189143

190144
workflows:
191145
version: 2
@@ -205,25 +159,3 @@ workflows:
205159
- test_npm_8:
206160
requires:
207161
- assemble_testClasses
208-
deploy:
209-
jobs:
210-
- release_all:
211-
type: approval
212-
- do_release_all:
213-
requires:
214-
- release_all
215-
- release_plugin_gradle:
216-
type: approval
217-
- do_release_plugin_gradle:
218-
requires:
219-
- release_plugin_gradle
220-
- release_plugin_maven:
221-
type: approval
222-
- do_release_plugin_maven:
223-
requires:
224-
- release_plugin_maven
225-
- release_lib:
226-
type: approval
227-
- do_release_lib:
228-
requires:
229-
- release_lib

.github/workflows/deploy.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# GH_TOKEN
2+
# NEXUS_USER
3+
# NEXUS_PASS
4+
# GPG_PASSPHRASE
5+
# GPG_KEY (base64)
6+
# gpg --export-secret-keys --armor KEY_ID | openssl base64 | pbcopy
7+
# GRADLE_PORTAL_KEY
8+
# GRADLE_PORTAL_SECRET
9+
10+
name: deploy
11+
on:
12+
workflow_dispatch:
13+
inputs:
14+
to_publish:
15+
description: 'What to publish'
16+
required: true
17+
default: 'all'
18+
type: choice
19+
options:
20+
- plugin-gradle
21+
- plugin-maven
22+
- all
23+
- lib
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
name: deploy
29+
env:
30+
gh_token: ${{ secrets.GH_TOKEN }}
31+
ORG_GRADLE_PROJECT_nexus_user: ${{ secrets.NEXUS_USER }}
32+
ORG_GRADLE_PROJECT_nexus_pass: ${{ secrets.NEXUS_PASS }}
33+
ORG_GRADLE_PROJECT_gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
34+
ORG_GRADLE_PROJECT_gpg_key64: ${{ secrets.GPG_KEY }}
35+
36+
gradle_key
37+
steps:
38+
- uses: actions/checkout@v3
39+
- name: jdk 11
40+
uses: actions/setup-java@v3
41+
with:
42+
java-version: 11
43+
distribution: 'temurin'
44+
- name: gradle caching
45+
uses: gradle/gradle-build-action@v2
46+
- name: publish all
47+
if: "${{ github.event.inputs.to_publish == 'all' }}"
48+
run: |
49+
./gradlew :changelogPush -Prelease=true --stacktrace --warning-mode all
50+
./gradlew :plugin-gradle:changelogPush -Prelease=true -Pgradle.publish.key=${{ secrets.GRADLE_PORTAL_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PORTAL_SECRET }} --stacktrace --warning-mode all
51+
./gradlew :plugin-maven:changelogPush -Prelease=true --stacktrace --warning-mode all
52+
- name: publish just plugin-gradle
53+
if: "${{ github.event.inputs.to_publish == 'plugin-gradle' }}"
54+
run: |
55+
./gradlew :plugin-gradle:changelogPush -Prelease=true -Pgradle.publish.key=${{ secrets.GRADLE_PORTAL_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PORTAL_SECRET }} --stacktrace --warning-mode all
56+
- name: publish just plugin-maven
57+
if: "${{ github.event.inputs.to_publish == 'plugin-maven' }}"
58+
run: |
59+
./gradlew :plugin-maven:changelogPush -Prelease=true --stacktrace --warning-mode all
60+
- name: publish just lib
61+
if: "${{ github.event.inputs.to_publish == 'lib' }}"
62+
run: |
63+
./gradlew :changelogPush -Prelease=true --stacktrace --warning-mode all

0 commit comments

Comments
 (0)