Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/cf-bind/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
using: composite
steps:
- name: CF Login
uses: cap-java/.github/actions/cf-login@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main
uses: cap-java/.github/actions/cf-login@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2 # main
with:
cf-api: ${{ inputs.cf-api }}
cf-username: ${{ inputs.cf-username }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ on:

jobs:
label_issues:
uses: cap-java/.github/.github/workflows/issue.yml@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main
uses: cap-java/.github/.github/workflows/issue.yml@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2 # main
permissions:
issues: write
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Scan With Black Duck
uses: cap-java/.github/actions/scan-with-blackduck@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main
uses: cap-java/.github/actions/scan-with-blackduck@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2 # main
with:
blackduck_token: ${{ secrets.BLACK_DUCK_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: CodeQL Analysis
uses: cap-java/.github/actions/scan-with-codeql@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main
uses: cap-java/.github/actions/scan-with-codeql@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2 # main
with:
java-version: '21'
maven-version: ${{ env.MAVEN_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prevent-issue-labeling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ on:

jobs:
remove_new_label:
uses: cap-java/.github/.github/workflows/prevent-issue-labeling.yml@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main
uses: cap-java/.github/.github/workflows/prevent-issue-labeling.yml@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2 # main
permissions:
issues: write
131 changes: 10 additions & 121 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,127 +1,16 @@
name: Deploy to Maven Central

env:
JAVA_VERSION: '17'
MAVEN_VERSION: '3.9.15'

on:
release:
types: ["released"]
types: [ "released" ]

jobs:
requires-approval:
runs-on: ubuntu-latest
name: "Waiting for release approval"
environment: release-approval
permissions:
contents: read
steps:
- name: Approval Step
run: echo "Release has been approved!"

verify-version:
needs: requires-approval
name: Verify Version Matches Tag
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.release.tag_name }}

- name: Set up Java
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: sapmachine
cache: maven

- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
with:
maven-version: ${{ env.MAVEN_VERSION }}

- name: Verify pom.xml revision matches release tag
env:
TAG: ${{ github.event.release.tag_name }}
run: |
REVISION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)
echo "Tag: $TAG"
echo "Revision: $REVISION"
if [ "$TAG" != "$REVISION" ]; then
echo "::error::Release tag '$TAG' does not match pom.xml <revision> '$REVISION'. Open a 'Prep release' PR to bump the version before tagging."
exit 1
fi
shell: bash

blackduck:
needs: verify-version
name: Blackduck Scan
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.release.tag_name }}

- name: Scan With Black Duck
uses: cap-java/.github/actions/scan-with-blackduck@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main
with:
blackduck_token: ${{ secrets.BLACK_DUCK_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
maven-version: ${{ env.MAVEN_VERSION }}
project-name: com.sap.cds.cds-ai
included-modules: cds-feature-ai-core,cds-feature-recommendations,cds-starter-ai
version: ${{ github.event.release.tag_name }}

build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 30
needs: verify-version
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.release.tag_name }}

- name: Build
uses: cap-java/.github/actions/build@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main
with:
java-version: ${{ env.JAVA_VERSION }}
maven-version: ${{ env.MAVEN_VERSION }}
maven-args: "-P '!with-integration-tests'"

deploy:
name: Deploy to Maven Central
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [blackduck, build]
environment: release
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.release.tag_name }}

- name: Deploy
uses: cap-java/.github/actions/deploy-release@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main
with:
user: ${{ secrets.CENTRAL_REPOSITORY_USER }}
password: ${{ secrets.CENTRAL_REPOSITORY_PASS }}
gpg-pub-key: ${{ secrets.PGP_PUBKEY_ID }}
gpg-private-key: ${{ secrets.PGP_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.PGP_PASSPHRASE }}
revision: ${{ github.event.release.tag_name }}
maven-version: ${{ env.MAVEN_VERSION }}
maven-profiles: "deploy-release,'!with-integration-tests'"
release:
uses: cap-java/.github/.github/workflows/release.yml@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best Practices: Missing # main comment on the pinned SHA reference.

Every other workflow file updated in this PR uses the convention @<sha> # main to document which branch the SHA was taken from, making it easy to verify and update the pin later. This line is the only one missing that annotation, reducing traceability consistency across the workflow files.

Suggested change
uses: cap-java/.github/.github/workflows/release.yml@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2
uses: cap-java/.github/.github/workflows/release.yml@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2 # main

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

with:
java-version: '17'
blackduck-project-name: com.sap.cds.cds-ai
blackduck-included-modules: cds-feature-ai-core,cds-feature-recommendations,cds-starter-ai
build-maven-args: "-P '!with-integration-tests'"
deploy-maven-profiles: "deploy-release,'!with-integration-tests'"
secrets: inherit
Comment on lines +9 to +16
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
stale:
uses: cap-java/.github/.github/workflows/stale.yml@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main
uses: cap-java/.github/.github/workflows/stale.yml@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2 # main
permissions:
actions: write
issues: write
Expand Down
Loading