-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #378 from KyleAure/fix-release-process
Fix release build
- Loading branch information
Showing
11 changed files
with
155 additions
and
33 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "The checkout.sh script requires exactly 1 argument" | ||
exit 1 | ||
fi | ||
|
||
branch=$1 | ||
|
||
if [ "$(git ls-remote --heads origin refs/heads/$branch | wc -l)" -eq "1" ]; then | ||
git fetch origin | ||
git checkout -t origin/$branch | ||
echo "branch_existed=true" >> $GITHUB_OUTPUT | ||
else | ||
git checkout main | ||
git checkout -b $branch | ||
echo "branch_existed=false" >> $GITHUB_OUTPUT | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This is a reusable workflow for creating a pull request for an existing branch in github | ||
|
||
name: Create a pull request | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
branch: | ||
required: true | ||
type: string | ||
title: | ||
required: true | ||
type: string | ||
body: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
pull: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Check branch | ||
id: check | ||
run: .github/scripts/checkout.sh ${{ inputs.branch }} | ||
- name: Create pull request | ||
if: steps.check.outputs.branch_existed == 'true' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh pr create \ | ||
--base main \ | ||
--head ${{ inputs.branch }} \ | ||
--title "${{ inputs.title }}" \ | ||
--body "${{ inputs.body }}" \ | ||
--label 'bot' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# This workflow automates the deployment of generated files | ||
|
||
name: Update generated files | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
|
||
# TODO update once 25-ea is available | ||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
java-version: [ '17', '21' ] | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Set up JDK ${{ matrix.java-version }} | ||
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Checkout branch | ||
id: checkout | ||
run: .github/scripts/checkout.sh update-generated-files-${{ github.sha }} | ||
- name: Generate signatures | ||
run: mvn package -Psignature-generation --file tck/pom.xml | ||
## Add any other automated update steps here | ||
- name: Needs updates | ||
id: update | ||
run: echo "update_count=$(git status -s -uno | wc -l)" >> $GITHUB_OUTPUT | ||
- name: Create commit | ||
if: steps.update.outputs.update_count > 0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
git add tck/src/main/resources/ | ||
git commit -m "Update generated files ${{ matrix.java-version }}" | ||
git push origin update-generated-files-${{ github.sha }} | ||
pull-request: | ||
needs: [update] | ||
uses: ./.github/workflows/pull-request.yml | ||
with: | ||
branch: 'update-generated-files-${{ github.sha }}' | ||
title: 'Update generated files' | ||
body: 'generated pull request' |