forked from vsch/flexmark-java
-
Notifications
You must be signed in to change notification settings - Fork 0
[chore]create deploy pipeline #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8adf373
[chore]create deploy pipeline
foo-543674 3ca5921
[chore]add report step
foo-543674 45702ae
[test]disable broken test
foo-543674 dd2270a
[chore]failed loading dependencies when pegdown test
foo-543674 a899fe3
[chore]v2 was released
foo-543674 8fa19a9
[chore]to reconize deploy job to GitHub
foo-543674 a902083
[chore]recreate job for deployment
foo-543674 fc7db0f
[chore]downgrade java to adjust to upstream
foo-543674 df7b7e9
[chode]use variable for version
foo-543674 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| name: Build and Test | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| branches: | ||
| - master | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| checks: write | ||
|
|
||
| env: | ||
| MAVEN_OPTS: -Xmx2g | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up JDK | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
| cache: 'maven' | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| mvn test \ | ||
| --batch-mode \ | ||
| --fail-at-end | ||
|
|
||
| - name: Report test results | ||
| uses: dorny/test-reporter@v2 | ||
| if: always() | ||
| with: | ||
| name: Maven Tests | ||
| path: '**/target/surefire-reports/*.xml' | ||
| reporter: java-junit | ||
| fail-on-error: 'false' | ||
|
|
||
| - name: Build project | ||
| run: | | ||
| mvn package \ | ||
| --batch-mode \ | ||
| -DskipTests=true |
This file contains hidden or 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: Deploy to AWS Maven Repository | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'Version to deploy (e.g., 0.64.9, will be prefixed with nu-)' | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up JDK | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
| cache: 'maven' | ||
|
|
||
| - name: Update version in pom.xml | ||
| run: | | ||
| mvn versions:set -DnewVersion=nu-${{ inputs.version }} -DgenerateBackupPoms=false | ||
|
|
||
| - name: Commit and push version changes | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add -A | ||
| git commit -m "chore: bump version to nu-${{ inputs.version }}" | ||
| git push | ||
|
|
||
| - name: Create and push tag | ||
| run: | | ||
| git tag -a "v${{ inputs.version }}" -m "Release version nu-${{ inputs.version }}" | ||
| git push origin "v${{ inputs.version }}" | ||
|
|
||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@main | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | ||
| aws-region: ${{ secrets.AWS_REGION }} | ||
|
|
||
| - name: Deploy flexmark-all to AWS Maven Repository | ||
| env: | ||
| MAVEN_REPOSITORY_ID: ${{ secrets.MAVEN_REPOSITORY_ID }} | ||
| MAVEN_REPOSITORY_URL: ${{ secrets.MAVEN_REPOSITORY_URL }} | ||
| run: | | ||
| mvn deploy -pl flexmark-all -am -DskipTests=true | ||
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@foo-543674 version21で大丈夫ですかね?
元々のflexmarkが使用していたものと合わせておいた方が、JVMのバージョン違いによる問題に合わないのでは?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raydive ありがとうございます。アプリのバージョンアップに合わせたほうがいいかなと思いましたが、問題が併発するのも避けたいので一旦下げました。