Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/full-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
# build, though maven snapshots are not yet deployed.
name: Full build
on:
schedule:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that with this removed, we will no longer publish to sonatype snapshots - the steps below use this check:

if: ${{ github.event_name == 'schedule' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}

This check is far from perfect - but as schedule only runs on the default branch, we don't have to worry about pushes to release/* overwriting latest HEAD-SNAPSHOT. To finish this patch and let a push event replace the schedule event for publishing, we'll have to make sure the GWT_VERSION env var makes sense too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New version pushed that should run this only when pushed to main. As I understand there are currently no Sonatype snapshots for release/* branches so maybe we can keep it like that for now?

# This time is selected to be early in the morning in NA/SA/EU/ME. This
# only runs on the default branch.
- cron: '0 6 * * *'
push:
# Build on pushes to main and release branches. For forks, the -test may
# be helpful to run tests when preparing a merge.
Expand All @@ -17,8 +13,11 @@ on:
- '*-test'
workflow_dispatch:
# Allow running manually
pull_request:
types: [ labeled, synchronize ]
jobs:
build:
if: ${{ !github.event.pull_request || contains(github.event.pull_request.labels.*.name, 'ready') }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -85,7 +84,7 @@ jobs:
- name: Set up sonatype credentials
# Using the same java version as above, set up a settings.xml file
uses: actions/setup-java@v4
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
if: ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
Expand All @@ -95,7 +94,7 @@ jobs:
server-password: SONATYPE_PASSWORD

- name: Nightly builds should be deployed as snapshots to sonatype
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
if: ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
Expand Down