-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply received feedback and add new features
- Package and publish API client - Build application image with Paketo - Tag and publish releases (Docker image, and optionally, application JAR) - Update documentation
- Loading branch information
1 parent
c3d37fa
commit ad95c8b
Showing
7 changed files
with
233 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
name: Build Branch | ||
on: | ||
push: | ||
branches-ignore: [ main ] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: SDKMAN Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.sdkman | ||
key: "${{ runner.os }}-sdkman-${{ hashFiles('.sdkmanrc') }}" | ||
restore-keys: "${{ runner.os }}-sdkman-" | ||
- name: Maven Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: "${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}" | ||
restore-keys: "${{ runner.os }}-maven-" | ||
- name: Install SDKMAN | ||
run: curl -s "https://get.sdkman.io?rcupdate=false" | bash | ||
- name: Build Application | ||
run: | | ||
source "$HOME/.sdkman/bin/sdkman-init.sh" | ||
sdk env install | ||
./mvnw | ||
- name: Build Client | ||
run: | | ||
export CLIENT_PATH='target/generated-sources/openapi' | ||
export CONTROLLERS_PATH='com/github/jaguililla/appointments/http/controllers' | ||
rm -rf "${CLIENT_PATH}/src/main/java/${CONTROLLERS_PATH}" | ||
mvn -f "${CLIENT_PATH}/pom.xml" clean install |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
name: Release Application | ||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: SDKMAN Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.sdkman | ||
key: "${{ runner.os }}-sdkman-${{ hashFiles('.sdkmanrc') }}" | ||
restore-keys: "${{ runner.os }}-sdkman-" | ||
- name: Maven Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: "${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}" | ||
restore-keys: "${{ runner.os }}-maven-" | ||
- name: Install SDKMAN | ||
run: curl -s "https://get.sdkman.io?rcupdate=false" | bash | ||
# Required for publishing (Maven settings.xml repository) | ||
- name: Java Setup | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: temurin | ||
- name: Publish and Tag Application | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
source "$HOME/.sdkman/bin/sdkman-init.sh" | ||
sdk env install | ||
./mvnw -B -P release | ||
- name: Publish Client | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
export CLIENT_PATH='target/generated-sources/openapi' | ||
export CONTROLLERS_PATH='com/github/jaguililla/appointments/http/controllers' | ||
export REPOSITORY='https://maven.pkg.github.com/jaguililla/spring_template' | ||
export ALT_REPOSITORY="altDeploymentRepository=github::default::${REPOSITORY}" | ||
rm -rf "${CLIENT_PATH}/src/main/java/${CONTROLLERS_PATH}" | ||
mvn -f "${CLIENT_PATH}/pom.xml" -B -D ${ALT_REPOSITORY} clean deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters