Skip to content

Commit

Permalink
Inlined CI shell scripts
Browse files Browse the repository at this point in the history
To make them easier to extract into a shared workflow.
  • Loading branch information
freemanjp committed Aug 2, 2022
1 parent a7ff900 commit 11bbcd4
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 49 deletions.
12 changes: 0 additions & 12 deletions .github/scripts/build.sh

This file was deleted.

21 changes: 0 additions & 21 deletions .github/scripts/deploy-site.sh

This file was deleted.

12 changes: 0 additions & 12 deletions .github/scripts/deploy.sh

This file was deleted.

18 changes: 16 additions & 2 deletions .github/workflows/maven-build.yml
Expand Up @@ -31,10 +31,24 @@ jobs:
uses: gantsign/maven-periodic-cache-action@v1
with:
additional-path: '!~/.m2/repository/com/github/gantsign/maven'
- name: Build with Maven
run: .github/scripts/build.sh
- name: Install Maven ${{ matrix.maven-version }}
shell: bash
run: |
set -e
curl --silent 'https://get.sdkman.io' | bash
echo sdkman_auto_answer=true > ~/.sdkman/etc/config
source ~/.sdkman/bin/sdkman-init.sh
sdk install maven "$MAVEN_VERSION"
echo "M2_HOME=$HOME/.sdkman/candidates/maven/$MAVEN_VERSION" >> $GITHUB_ENV
env:
MAVEN_VERSION: ${{ matrix.maven-version }}
- name: Build with Maven
run: |
"$M2_HOME/bin/mvn" install \
--batch-mode \
--show-version \
-Dinvoker.streamLogs=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Code coverage report
if: matrix.maven-version == '3.6.1'
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/maven-deploy.yml
Expand Up @@ -28,7 +28,14 @@ jobs:
key-suffix: '-deploy'
additional-path: '!~/.m2/repository/com/github/gantsign/maven'
- name: Deploy with Maven
run: .github/scripts/deploy.sh
run: |
./mvnw deploy \
--settings .github/maven/settings.xml \
-P publish-artifacts,sign-artifacts,ossrh-deploy \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode \
--show-version
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -43,7 +43,30 @@ jobs:
run: >-
git config --global user.name 'John Freeman' &&
git config --global user.email '17984707+freemanjp@users.noreply.github.com'
- name: Build Maven site
run: |
./mvnw site \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode \
--show-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Stage Maven site
run: |
./mvnw site:stage \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Maven site
run: .github/scripts/deploy-site.sh
run: |
./mvnw scm-publish:publish-scm \
--settings .github/maven/settings.xml \
-P gh-pages \
-DskipTests \
-Dinvoker.skip=true \
--batch-mode
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 11bbcd4

Please sign in to comment.