Enable build scan for publish (debug) #171
This file contains 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
--- | |
name: 'Build & Publish' | |
on: # yamllint disable-line rule:truthy | |
push: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
uses: metaborg/actions/.github/workflows/gradle-build-matrix.yaml@main | |
with: | |
gradle-command: | | |
gradle build | |
# Publish snapshots | |
publish-snapshot: | |
uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main | |
with: | |
gradle-command: | | |
gradle publish -Pgitonium.isSnapshot=true | |
gradle-version-command: | | |
gradle -q :convention-plugin:printVersion -Pgitonium.isSnapshot=true | |
gradle-build-scan-publish: true | |
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'" | |
needs: [build] | |
secrets: | |
METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }} | |
METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }} | |
# Publish releases | |
publish-release: | |
uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main | |
with: | |
gradle-command: | | |
gradle publish | |
gradle-version-command: | | |
gradle -q :convention-plugin:printVersion | |
gradle-build-scan-publish: true | |
if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/release-')" | |
needs: [build] | |
secrets: | |
METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }} | |
METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }} |