empty comit to trigger CI #35
This file contains hidden or 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: Publish snapshots to maven | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - 1.* | |
| - 2.* | |
| jobs: | |
| build-and-publish-snapshots: | |
| strategy: | |
| fail-fast: false | |
| if: github.repository == 'opensearch-project/ml-commons' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin # Temurin is a distribution of adoptium | |
| java-version: 11 | |
| - uses: actions/checkout@v3 | |
| - name: Load secret | |
| uses: 1password/load-secrets-action@v2 | |
| with: | |
| # Export loaded secrets as environment variables | |
| export-env: true | |
| env: | |
| OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
| SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username | |
| SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password | |
| - name: publish snapshots to maven | |
| run: | | |
| ./gradlew publishPluginZipPublicationToSnapshotsRepository publishShadowPublicationToSnapshotsRepository |