Fixing #2859 by adding a createResponseInternal to allow fallback processing of index attribute in WebServerInterceptor. #1687
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: Create Release | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| branches: | |
| - master | |
| - 7** | |
| - 6** | |
| - 5** | |
| - 4** | |
| jobs: | |
| build-release: | |
| if: github.event.pull_request.merged && startsWith(github.event.pull_request.title, 'Release ') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get version | |
| id: get_version | |
| run: echo '${{ github.head_ref }}' | sed 's/v/::set-output name=VERSION::/' | |
| - name: Set up Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: Update $schema URL in YAML files | |
| run: | | |
| VERSION='${{ steps.get_version.outputs.VERSION }}' | |
| echo "Updating schema URLs in YAML files to v${VERSION}.json" | |
| find . \( -name "apis.yaml" -o -name "apis.yml" \) -print0 | while IFS= read -r -d '' file; do | |
| echo "Fixing $file" | |
| sed -i "s|\$schema=https://www\.membrane-api\.io/v[0-9\.]\+\.json|\$schema=https://www.membrane-api.io/v${VERSION}.json|g" "$file" | |
| done | |
| - id: compile-membrane | |
| name: Compile Membrane | |
| run: | | |
| mvn install \ | |
| --no-transfer-progress \ | |
| --batch-mode \ | |
| -DskipTests | |
| - name: Setup next Snapshot version | |
| run: | | |
| cd distribution | |
| if [ -e src/test/java/com/predic8/membrane/examples/env/ConsistentVersionNumbers.java ] ; then | |
| CLASS=com.predic8.membrane.examples.env.ConsistentVersionNumbers | |
| elif [ -e src/test/java/com/predic8/membrane/examples/withoutinternet/env/ConsistentVersionNumbers.java ] ; then | |
| CLASS=com.predic8.membrane.examples.withoutinternet.env.ConsistentVersionNumbers | |
| else | |
| echo "ConsistentVersionNumbers.java not found." | |
| exit 1 | |
| fi | |
| mvn test-compile exec:java \ | |
| --no-transfer-progress \ | |
| --batch-mode \ | |
| -DmainClass=$CLASS \ | |
| -Dexec.classpathScope="test" \ | |
| -DmainArgs="-snapshot" | |
| cd .. | |
| - name: Create Pull Request for next Snapshot | |
| id: cpr | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| commit-message: "Snapshot version" | |
| title: "Snapshot version" | |
| author: "github-actions <github-actions@github.com>" | |
| body: "Update all project `pom.xml` and related files to post-${{ steps.get_version.outputs.VERSION }} snapshot version" | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.ref }} | |
| - id: install-secret-key | |
| name: Install gpg secret key | |
| run: | | |
| # Install gpg secret key | |
| cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import | |
| # Verify gpg secret key | |
| gpg --list-secret-keys --keyid-format LONG | |
| - id: build-artifact | |
| name: Build release artefacts | |
| run: | | |
| mvn \ | |
| --no-transfer-progress \ | |
| --batch-mode \ | |
| -DskipTests \ | |
| -Pcentral \ | |
| -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \ | |
| clean verify | |
| - name: Ensure release files exist | |
| run: | | |
| touch distribution/release-notes/${{ steps.get_version.outputs.VERSION }}.md | |
| touch distribution/target/membrane-api-gateway-${{ steps.get_version.outputs.VERSION }}.zip.asc | |
| - name: Create Release v${{ steps.get_version.outputs.VERSION }} | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| name: v${{ steps.get_version.outputs.VERSION }} | |
| tag: ${{ github.head_ref }} | |
| commit: ${{ github.event.pull_request.merge_commit_sha }} | |
| prerelease: true | |
| # makeLatest: true | |
| bodyFile: "distribution/release-notes/${{ steps.get_version.outputs.VERSION }}.md" | |
| artifacts: "core/target/classes/com/predic8/membrane/core/config/json/membrane.schema.json,distribution/target/membrane-api-gateway-${{ steps.get_version.outputs.VERSION }}.zip,distribution/target/membrane-api-gateway-${{ steps.get_version.outputs.VERSION }}.zip.asc" | |
| token: ${{ secrets.PAT }} | |
| - name: Trigger website pipeline on GitLab | |
| env: | |
| GITLAB_TRIGGER_TOKEN: ${{ secrets.GITLAB_TRIGGER_TOKEN }} | |
| run: | | |
| VERSION='${{ steps.get_version.outputs.VERSION }}' | |
| echo "Triggering GitLab pipeline for membrane-api.io with VERSION=${VERSION}" | |
| curl -X POST --fail --timeout 10 \ | |
| -F token="${GITLAB_TRIGGER_TOKEN}" \ | |
| -F ref=main \ | |
| -F "variables[MEMBRANE_VERSION]=${VERSION}" \ | |
| https://gitlab.predic8.de/api/v4/projects/prod%2Fmembrane-api.io/trigger/pipeline | |