Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit 3214c6d

Browse files
committed
[skip ci] remove pre release workflow
1 parent 5369829 commit 3214c6d

File tree

5 files changed

+8
-234
lines changed

5 files changed

+8
-234
lines changed

.github/workflows/gradle.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,13 @@ on:
99
workflow_dispatch:
1010
jobs:
1111
build:
12-
outputs:
13-
found_skip_publish: ${{ steps.check_prevent_property.outputs.value }}
1412
runs-on: ubuntu-latest
1513
permissions:
1614
contents: read
1715
packages: read
1816
steps:
1917
- name: "📥 Checkout the repository"
2018
uses: actions/checkout@v4
21-
- name: "🔍 Check if we should skip publish"
22-
id: check_prevent_property
23-
run: |
24-
if grep -q '^preventSnapshotPublish=true' gradle.properties; then
25-
echo "value=true" >> $GITHUB_OUTPUT
26-
else
27-
echo "value=false" >> $GITHUB_OUTPUT
28-
fi
2919
- name: "☕️ Setup JDK"
3020
uses: actions/setup-java@v4
3121
with:
@@ -47,7 +37,7 @@ jobs:
4737
name: grails-gsp-SNAPSHOT.zip
4838
path: ./**/build/libs/*
4939
publish:
50-
if: github.event_name == 'push' && needs.build.outputs.found_skip_publish != 'true'
40+
if: github.event_name == 'push'
5141
needs: build
5242
runs-on: ubuntu-latest
5343
permissions:
@@ -72,7 +62,7 @@ jobs:
7262
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
7363
run: ./gradlew publish
7464
docs:
75-
if: github.event_name == 'push' && needs.build.outputs.found_skip_publish != 'true'
65+
if: github.event_name == 'push'
7666
needs: build
7767
runs-on: ubuntu-latest
7868
permissions:

.github/workflows/pre-release.yml

-125
This file was deleted.

.github/workflows/release.yml

+1-71
Original file line numberDiff line numberDiff line change
@@ -12,80 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313
permissions:
1414
contents: read
15-
packages: write
15+
packages: read
1616
steps:
17-
- name: "💥 Purge Existing Builds - org.grails.grails-gsp"
18-
run: |
19-
curl -L \
20-
-X DELETE \
21-
-H "Accept: application/vnd.github+json" \
22-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
23-
-H "X-GitHub-Api-Version: 2022-11-28" \
24-
https://api.github.com/orgs/${{ github.repository_owner }}/packages/maven/org.grails.grails-gsp || true
25-
- name: "💥 Purge Existing Builds - org.grails.grails-taglib"
26-
run: |
27-
curl -L \
28-
-X DELETE \
29-
-H "Accept: application/vnd.github+json" \
30-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
31-
-H "X-GitHub-Api-Version: 2022-11-28" \
32-
https://api.github.com/orgs/grails/packages/maven/org.grails.grails-taglib || true
33-
- name: "💥 Purge Existing Builds - org.grails.grails-web-gsp-taglib"
34-
run: |
35-
curl -L \
36-
-X DELETE \
37-
-H "Accept: application/vnd.github+json" \
38-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
39-
-H "X-GitHub-Api-Version: 2022-11-28" \
40-
https://api.github.com/orgs/${{ github.repository_owner }}/packages/maven/org.grails.grails-web-gsp-taglib || true
41-
- name: "💥 Purge Existing Builds - org.grails.grails-web-jsp"
42-
run: |
43-
curl -L \
44-
-X DELETE \
45-
-H "Accept: application/vnd.github+json" \
46-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
47-
-H "X-GitHub-Api-Version: 2022-11-28" \
48-
https://api.github.com/orgs/${{ github.repository_owner }}/packages/maven/org.grails.grails-web-jsp || true
49-
- name: "💥 Purge Existing Builds - org.grails.grails-web-gsp"
50-
run: |
51-
curl -L \
52-
-X DELETE \
53-
-H "Accept: application/vnd.github+json" \
54-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
55-
-H "X-GitHub-Api-Version: 2022-11-28" \
56-
https://api.github.com/orgs/${{ github.repository_owner }}/packages/maven/org.grails.grails-web-gsp || true
57-
- name: "💥 Purge Existing Builds - org.grails.grails-web-taglib"
58-
run: |
59-
curl -L \
60-
-X DELETE \
61-
-H "Accept: application/vnd.github+json" \
62-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
63-
-H "X-GitHub-Api-Version: 2022-11-28" \
64-
https://api.github.com/orgs/${{ github.repository_owner }}/packages/maven/org.grails.grails-web-taglib || true
65-
- name: "💥 Purge Existing Builds - org.grails.plugins.gsp"
66-
run: |
67-
curl -L \
68-
-X DELETE \
69-
-H "Accept: application/vnd.github+json" \
70-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
71-
-H "X-GitHub-Api-Version: 2022-11-28" \
72-
https://api.github.com/orgs/${{ github.repository_owner }}/packages/maven/org.grails.plugins.gsp || true
7317
- name: Checkout repository
7418
uses: actions/checkout@v4
75-
- name: "⎌ Revert Prevent Snapshot Publishing Flag"
76-
run: |
77-
sed -i "s/^preventSnapshotPublish.*$/preventSnapshotPublish\=false/" gradle.properties
78-
- name: "📩 Commit flag to allow snapshot publishing"
79-
run: |
80-
git config user.name "${{ env.GIT_USER_NAME }}"
81-
git config user.email "${{ env.GIT_USER_EMAIL }}"
82-
git add gradle.properties
83-
if ! git diff --cached --quiet; then
84-
git commit -m "[skip ci] Restore Snapshot Publishing"
85-
git push origin HEAD
86-
else
87-
echo "Publishing already enabled."
88-
fi
8919
- name: "☕️ Setup JDK"
9020
uses: actions/setup-java@v4
9121
with:

build.gradle

+5-22
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ buildscript {
1313

1414
ext {
1515
isCiBuild = System.getenv().get("TRAVIS") == 'true' || (System.getenv().get("CI") as Boolean)
16-
isGitHubRepoPublish = System.getenv("GITHUB_PUBLISH") == 'true'
17-
isGrailsRepoPublish = project.projectVersion.endsWith('-SNAPSHOT') && !isGitHubRepoPublish
18-
isReleaseVersion = !isGrailsRepoPublish && !isGitHubRepoPublish
16+
isSnapshot = project.projectVersion.endsWith('-SNAPSHOT')
17+
isReleaseVersion = !isSnapshot
1918
}
2019

2120
group = "org.grails"
@@ -218,35 +217,21 @@ subprojects { subproject ->
218217
tasks.findByName("assemble").finalizedBy(sourcesJar, javadocJar)
219218

220219
publishing {
221-
if (isGrailsRepoPublish || isGitHubRepoPublish) {
220+
if (isSnapshot) {
222221
repositories {
223222
maven {
224223
credentials {
225-
if(isGrailsRepoPublish) {
226224
def u = System.getenv('ARTIFACTORY_USERNAME') ?: project.findProperty('artifactoryPublishUsername') ?: ''
227225
def p = System.getenv('ARTIFACTORY_PASSWORD') ?: project.findProperty('artifactoryPublishPassword') ?: ''
228226
username = u
229227
password = p
230228
}
231-
else {
232-
def u = System.getenv('GITHUB_USERNAME') ?: ''
233-
def p = System.getenv('GITHUB_PASSWORD') ?: ''
234-
username = u
235-
password = p
236-
}
237-
}
238-
239-
if(isGrailsRepoPublish) {
240229
if (isGrailsPlugin) {
241230
url "https://repo.grails.org/grails/plugins3-snapshots-local"
242231
} else {
243232
url "https://repo.grails.org/grails/libs-snapshots-local"
244233
}
245234
}
246-
else {
247-
url 'https://maven.pkg.github.com/grails/grails-gsp'
248-
}
249-
}
250235
}
251236
}
252237

@@ -283,23 +268,21 @@ subprojects { subproject ->
283268

284269
subproject.afterEvaluate {
285270
signing {
286-
required { isReleaseVersion || isGitHubRepoPublish }
271+
required { isReleaseVersion }
287272
sign publishing.publications.maven
288273
}
289274
}
290275

291276
tasks.withType(Sign) {
292-
onlyIf { isReleaseVersion || isGitHubRepoPublish }
277+
onlyIf { isReleaseVersion }
293278
}
294279

295280
//do not generate extra load on Nexus with new staging repository if signing fails
296-
if(isReleaseVersion) {
297281
tasks.withType(io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository).configureEach {
298282
shouldRunAfter(tasks.withType(Sign))
299283
}
300284
}
301285
}
302-
}
303286

304287
def DOCUMENTATION_GROUP = 'Documentation'
305288

gradle.properties

-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,3 @@ junit-jupiter.version=5.8.0
2525
org.gradle.caching=true
2626
org.gradle.parallel=true
2727
org.gradle.daemon=true
28-
29-
# Set when we are temporarily releasing, should be false unless we want to prevent
30-
# snapshot or documentation publishes.
31-
preventSnapshotPublish=true

0 commit comments

Comments
 (0)