fix: network available listener (#122) #30
Workflow file for this run
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 SDK | |
| on: | |
| # either if we push a tag manually or if it's called from create-release workflow | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_call: | |
| jobs: | |
| deploy-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # make sure you have full history and tags | |
| - name: Checkout tag if available | |
| id: find_tag | |
| run: | | |
| TAG=$(git tag --points-at HEAD) | |
| if [ -n "$TAG" ]; then | |
| echo "Tag found: $TAG. Checking out tag..." | |
| git checkout "$TAG" | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| else | |
| echo "No tag found on this commit." | |
| echo "tag=" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| cache: gradle | |
| - uses: burrunan/gradle-cache-action@v1 | |
| name: Deploy Release to Maven central | |
| env: | |
| ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} | |
| ORG_GRADLE_PROJECT_signingPassphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| ORG_GRADLE_PROJECT_mavenCentralToken: ${{ secrets.MAVEN_CENTRAL_TOKEN }} | |
| with: | |
| job-id: release | |
| arguments: publishToMavenCentralPortal | |
| - name: Create Github release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.find_tag.outputs.tag }} | |
| release_name: ${{ steps.find_tag.outputs.tag }} | |
| prerelease: ${{ contains(steps.find_tag.outputs.tag, 'beta') || contains(steps.find_tag.outputs.tag, 'rc') }} |