-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workflows): implement build and release workflows
- Loading branch information
Showing
6 changed files
with
127 additions
and
0 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,55 @@ | ||
--- | ||
name: Build | ||
|
||
"on": | ||
workflow_call: | ||
inputs: | ||
path: | ||
description: Path to package directory | ||
required: true | ||
type: string | ||
manifest: | ||
description: Output from release-please | ||
required: true | ||
type: string | ||
workflow_dispatch: | ||
inputs: | ||
path: | ||
description: Path to package directory | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.PAT }} | ||
- name: JDK Setup | ||
uses: actions/setup-java@v3 | ||
with: | ||
cache: maven | ||
java-version: '17' | ||
distribution: temurin | ||
- name: Maven Package | ||
run: | | ||
mvn --batch-mode clean package | ||
test -f ./target/*.jar | ||
working-directory: ${{ inputs.path }} | ||
- name: Upload Artifact to Release | ||
if: github.event_name == 'workflow_call' | ||
uses: shogo82148/[email protected] | ||
with: | ||
github_token: ${{ secrets.PAT }} | ||
upload_url: ${{ fromJSON(inputs.manifest)[format('{0}--upload_url', inputs.path)] }} | ||
asset_path: ./${{ inputs.path }}/target/*.jar | ||
asset_content_type: application/java-archive | ||
overwrite: true | ||
- name: Publish to GitHub Packages | ||
run: mvn --batch-mode deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
working-directory: ${{ inputs.path }} |
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: Release Please | ||
|
||
"on": | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: release-please | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
release-please: | ||
name: Release Please | ||
outputs: | ||
manifest: ${{ toJSON(steps.rp.outputs) }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Generate App Token | ||
uses: tibdex/github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- name: Release Please | ||
id: rp | ||
uses: GoogleCloudPlatform/[email protected] | ||
with: | ||
token: ${{ steps.generate-token.outputs.token }} | ||
matrix: | ||
if: ${{ fromJSON(needs.release-please.outputs.manifest).releases_created == 'true' }} | ||
needs: [release-please] | ||
secrets: inherit | ||
strategy: | ||
matrix: | ||
path: ${{ fromJSON(fromJSON(needs.release-please.outputs.manifest).paths_released) }} | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
path: ${{ matrix.path }} | ||
manifest: ${{ needs.release-please.outputs.manifest }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
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,8 @@ | ||
{ | ||
"packages": { | ||
"sulla": { | ||
"package-name": "oxygen", | ||
"release-type": "maven" | ||
} | ||
} | ||
} |