feat: migrate to com.qtsurfer:sdk 0.4.0 via JitPack custom domain #9
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['[0-9]*.[0-9]*.[0-9]*'] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| unit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Build + unit tests | |
| run: mvn -B verify | |
| env: | |
| # Skip the gated integration test in this job | |
| JWT_API_TOKEN: '' | |
| integration: | |
| needs: unit | |
| runs-on: ubuntu-latest | |
| environment: Preproduction | |
| if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Run integration test | |
| env: | |
| JWT_API_TOKEN: ${{ secrets.JWT_API_TOKEN }} | |
| QTSURFER_API_URL: ${{ vars.QTSURFER_API_URL }} | |
| QTSURFER_TEST_VERBOSE: '1' | |
| run: | | |
| if [ -z "$JWT_API_TOKEN" ]; then | |
| echo "::warning::JWT_API_TOKEN not configured in the Preproduction environment; skipping." | |
| exit 0 | |
| fi | |
| mvn -B -Dtest='*IntegrationTest' test | |
| release: | |
| needs: [unit, integration] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract changelog for ${{ github.ref_name }} | |
| id: changelog | |
| run: | | |
| VERSION="${GITHUB_REF_NAME}" | |
| NOTES=$(awk "/^## \[$VERSION\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md) | |
| echo "notes<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$NOTES" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create "$GITHUB_REF_NAME" \ | |
| --title "$GITHUB_REF_NAME" \ | |
| --notes "${{ steps.changelog.outputs.notes }}" |