Skip to content

Commit bfdbedb

Browse files
fix(ci): Correct release creation and skip PR tests (#3)
The `gh release create` command was failing with a "fatal: not a git repository" error because it was running in the root workspace directory instead of the `bc-java` subdirectory where the repository is checked out. This commit fixes the issue by adding `working-directory: bc-java` to the release creation step. Additionally, as requested, tests are now skipped for pull request builds by adding the `-x test` flag to the Gradle command. Co-authored-by: jiacontrerasp <[email protected]> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent a62a397 commit bfdbedb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Build with Gradle (PR)
3737
if: github.event_name == 'pull_request'
38-
run: ./gradlew build -x :mls:build -x :prov:compileJava25Java -x :tls:compileJava25Java
38+
run: ./gradlew build -x :mls:build -x :prov:compileJava25Java -x :tls:compileJava25Java -x test
3939
working-directory: bc-java
4040

4141
- name: Build with Gradle (main)
@@ -70,8 +70,9 @@ jobs:
7070
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
7171
env:
7272
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
working-directory: bc-java
7374
run: |
7475
gh release create v${{ env.version }} \
7576
--title "Release v${{ env.version }}" \
7677
--notes "Release v${{ env.version }}" \
77-
bc-java/out/*.jar
78+
out/*.jar

0 commit comments

Comments
 (0)