-
Notifications
You must be signed in to change notification settings - Fork 0
Java #1
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
Java #1
Changes from all commits
e0060f5
40e4611
bb4c8ef
8254424
32e1b0b
cbb926c
2f6a69a
702564a
496c9d1
3dcc737
b7c3d84
9bc141b
4e81645
4a8e1e1
d73b1eb
07944fe
a720d7b
f464364
cf86baf
3ffadac
a6f482e
d605e48
4383d6e
edd7cbd
e366852
a8bc0f8
7031310
cdf947b
dddddb1
ebbac6b
5427eeb
f80a7dd
6fe7cf6
0a2a0f2
78e2ab8
7ad7d99
73fa1f4
3a0a55f
89f7691
53e7b6f
f6eedf2
8f4ab51
c00a47c
ff517b7
7c5573a
b99703a
1b07042
3d0c187
a40098e
1030f7b
3900087
428cb64
ea6e213
29be78a
1ac7acd
245d856
89c0f43
f95bc54
7643757
e30fcca
0255efd
c2a4f72
4807d2d
84ee8ad
1ef2b1b
6dc2ac9
e3efc41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| .git | ||
| target | ||
| node_modules | ||
| *.md | ||
| docs/ | ||
| tests/ | ||
| .github/ | ||
| helm/ | ||
| src/osscodeiq/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Beta Release (Java) | ||
| on: | ||
| workflow_dispatch: # Manual trigger ONLY | ||
|
|
||
| jobs: | ||
| beta: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '25' | ||
| cache: 'maven' | ||
| server-id: central | ||
| server-username: MAVEN_USERNAME | ||
| server-password: MAVEN_PASSWORD | ||
| gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
| gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
|
||
| - name: Determine beta version | ||
| id: version | ||
| run: | | ||
| LATEST_BETA=$(git tag -l 'v0.0.1-beta.*' | sort -V | tail -1) | ||
| if [ -z "$LATEST_BETA" ]; then | ||
| NEXT_NUM=0 | ||
| else | ||
| CURRENT_NUM=$(echo "$LATEST_BETA" | grep -oP 'beta\.\K[0-9]+') | ||
| NEXT_NUM=$((CURRENT_NUM + 1)) | ||
| fi | ||
| VERSION="0.0.1-beta.${NEXT_NUM}" | ||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
| echo "tag=v$VERSION" >> $GITHUB_OUTPUT | ||
| echo "Next beta version: $VERSION" | ||
|
|
||
| - name: Set version in pom.xml | ||
| run: mvn versions:set -DnewVersion=${{ steps.version.outputs.version }} -B | ||
|
|
||
| - name: Build and test | ||
| run: mvn clean verify -B | ||
|
|
||
| - name: Deploy to Maven Central | ||
| env: | ||
| MAVEN_USERNAME: ${{ secrets.OSS_NEXUS_USER }} | ||
| MAVEN_PASSWORD: ${{ secrets.OSS_NEXUS_PASS }} | ||
| MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
| run: mvn deploy -P release -DskipTests -B | ||
|
|
||
| - name: Create git tag | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git tag -a ${{ steps.version.outputs.tag }} -m "Beta release ${{ steps.version.outputs.version }}" | ||
| git push origin ${{ steps.version.outputs.tag }} | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ steps.version.outputs.tag }} | ||
| name: "Beta ${{ steps.version.outputs.version }}" | ||
| prerelease: true | ||
| generate_release_notes: true | ||
| files: | | ||
| target/code-iq-*-cli.jar | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | |||||||||||||||||||||||
| name: Java CI | |||||||||||||||||||||||
| on: | |||||||||||||||||||||||
| push: | |||||||||||||||||||||||
| branches: [main, java] | |||||||||||||||||||||||
| paths: ['src/**', 'pom.xml'] | |||||||||||||||||||||||
| pull_request: | |||||||||||||||||||||||
| branches: [main, java] | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||
| build: | |||||||||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||||||||
| steps: | |||||||||||||||||||||||
| - uses: actions/checkout@v4 | |||||||||||||||||||||||
| - uses: actions/setup-java@v4 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| distribution: 'temurin' | |||||||||||||||||||||||
| java-version: '25' | |||||||||||||||||||||||
| cache: 'maven' | |||||||||||||||||||||||
| - run: mvn clean verify -B | |||||||||||||||||||||||
| - uses: actions/upload-artifact@v4 | |||||||||||||||||||||||
| if: always() | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| name: test-results | |||||||||||||||||||||||
| path: target/surefire-reports/ | |||||||||||||||||||||||
| - uses: actions/upload-artifact@v4 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| name: coverage-report | |||||||||||||||||||||||
| path: target/site/jacoco/ | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| cross-platform: | |||||||||||||||||||||||
|
Comment on lines
+11
to
+30
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI about 2 months ago To fix the problem, explicitly restrict the Concretely:
No additional methods, imports, or external definitions are needed—this is purely a YAML configuration change.
Suggested changeset
1
.github/workflows/ci-java.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||
| needs: build | |||||||||||||||||||||||
| strategy: | |||||||||||||||||||||||
| fail-fast: false | |||||||||||||||||||||||
| matrix: | |||||||||||||||||||||||
| os: [windows-latest, macos-latest] | |||||||||||||||||||||||
| runs-on: ${{ matrix.os }} | |||||||||||||||||||||||
| steps: | |||||||||||||||||||||||
| - uses: actions/checkout@v4 | |||||||||||||||||||||||
| - uses: actions/setup-java@v4 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| distribution: 'temurin' | |||||||||||||||||||||||
| java-version: '25' | |||||||||||||||||||||||
| cache: 'maven' | |||||||||||||||||||||||
| - run: mvn clean verify -B -pl . -Dfrontend.skip=true | |||||||||||||||||||||||
| continue-on-error: true | |||||||||||||||||||||||
|
Comment on lines
+31
to
+45
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI about 2 months ago Generally, to fix this type of problem, you add a For this specific workflow in permissions:
contents: readNo additional imports or methods are needed; this is pure YAML configuration. The change will ensure that, regardless of organization/repo defaults, this workflow always runs with a read-only GITHUB_TOKEN for repository contents and satisfies the CodeQL rule.
Suggested changeset
1
.github/workflows/ci-java.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||
This file was deleted.
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium