File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " Copilot Setup Steps"
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ paths :
7+ - .github/workflows/copilot-setup-steps.yml
8+ pull_request :
9+ paths :
10+ - .github/workflows/copilot-setup-steps.yml
11+
12+ jobs :
13+ # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
14+ copilot-setup-steps :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : read
18+
19+ # Steps that will run before the agent starts
20+ steps :
21+ - name : ' Checkout'
22+ uses : actions/checkout@v4
23+ with :
24+ submodules : true
25+ - name : Read Java version from gradle.properties
26+ id : java_version
27+ run : |
28+ if [ -f gradle.properties ] && grep -q '^java_version=' gradle.properties; then
29+ VERSION=$(grep '^java_version=' gradle.properties | cut -d'=' -f2)
30+ else
31+ VERSION=17
32+ fi
33+ echo "Using Java version: $VERSION"
34+ echo "version=$VERSION" >> $GITHUB_OUTPUT
35+ - name : ' Setup Java'
36+ uses : actions/setup-java@v4
37+ with :
38+ distribution : ' microsoft'
39+ java-version : ${{ steps.java_version.outputs.version }}
40+ - name : ' Setup Gradle'
41+ uses : gradle/actions/setup-gradle@v4
42+ with :
43+ gradle-version : wrapper
44+ cache-read-only : false
45+ - name : ' Build'
46+ run : ./gradlew build --no-daemon
47+ env :
48+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
49+ MAVEN_KEY : ${{ secrets.MAVEN_KEY }}
50+ GITHUB_USER : ${{ github.actor }}
51+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments