Skip to content

Commit b875a17

Browse files
authored
fix(ci): Update snapshot publishing (#891)
Snapshots for the active branch were not published because of a condition in the github workflow. The SKIP_SNAPSHOT env var should suffice to prevent snapshot publishing of older branches. Also formatted the SKIP_SNAPSHOT conditions, so it is easier to read and maintain, especially when more branches are added.
1 parent 7dbc00f commit b875a17

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/gradle.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
if_true: 'grails/grails-doc'
4949
if_false: ${{ github.repository }}
5050
- name: Publish Snapshot Documentation to Github Pages
51-
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/6.0.x'
51+
if: success() && github.event_name == 'push'
5252
uses: micronaut-projects/github-pages-deploy-action@grails
5353
env:
5454
BRANCH: gh-pages
@@ -57,4 +57,8 @@ jobs:
5757
FOLDER: build/docs
5858
GH_TOKEN: ${{ secrets.GH_TOKEN }}
5959
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
60-
SKIP_SNAPSHOT: ${{ startsWith(steps.extract_branch.outputs.value, '3.3') || startsWith(steps.extract_branch.outputs.value, '4.1') || startsWith(steps.extract_branch.outputs.value, '5.3') }}
60+
SKIP_SNAPSHOT: ${{
61+
startsWith(steps.extract_branch.outputs.value, '3.3') ||
62+
startsWith(steps.extract_branch.outputs.value, '4.1') ||
63+
startsWith(steps.extract_branch.outputs.value, '5.3')
64+
}}

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ jobs:
1010
runs-on: ubuntu-latest
1111
env:
1212
BETA: ${{ contains(github.event.inputs.grails_version, 'M') }}
13-
SKIP_SNAPSHOT: ${{ startsWith(github.event.inputs.grails_version, '3.3') || startsWith(github.event.inputs.grails_version, '4.1') || startsWith(github.event.inputs.grails_version, '5.3') || contains(github.event.inputs.grails_version, 'M') || contains(github.event.inputs.grails_version, 'RC') }}
13+
SKIP_SNAPSHOT: ${{
14+
startsWith(github.event.inputs.grails_version, '3.3') ||
15+
startsWith(github.event.inputs.grails_version, '4.1') ||
16+
startsWith(github.event.inputs.grails_version, '5.3') ||
17+
contains(github.event.inputs.grails_version, 'M') ||
18+
contains(github.event.inputs.grails_version, 'RC')
19+
}}
1420
GIT_USER_NAME: puneetbehl
1521
GIT_USER_EMAIL: behlp@unityfoundation.io
1622
steps:

0 commit comments

Comments
 (0)