v3.8.376 #29
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: Semantic release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate token | |
| id: app-token | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| client-id: ${{ secrets.SEMANTIC_RELEASE_APP_ID }} | |
| private-key: ${{ secrets.SEMANTIC_RELEASE_PK }} | |
| - uses: actions/checkout@v7 | |
| with: | |
| token: "${{ steps.app-token.outputs.token }}" | |
| - name: Configure SSH commit signing | |
| env: | |
| SIGNING_KEY: ${{ secrets.SEMANTIC_RELEASE_SIGNING_KEY }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "$SIGNING_KEY" > ~/.ssh/signing_key | |
| chmod 600 ~/.ssh/signing_key | |
| git config --global gpg.format ssh | |
| git config --global user.signingkey ~/.ssh/signing_key | |
| git config --global commit.gpgSign true | |
| git config --global tag.gpgSign true | |
| git config --global user.name 'vmaas-bot' | |
| git config --global user.email '40663028+vmaas-bot@users.noreply.github.com' | |
| - name: increment version, commit, push | |
| run: | | |
| DOC_FILE="docs/v3/openapi.json docs/admin/openapi.json" | |
| CLOWDER_FILE=deploy/clowdapp.yaml | |
| VERSION=$(cat VERSION) | |
| [ "$(git log -1 --pretty=%B)" == "$VERSION" ] && exit 0 | |
| RELEASE_TYPE=$(git log -1 | tail -n1) # Check release type (/major, /minor, /patch (default)) | |
| VERSION_NEXT=$(./scripts/increment_version.sh $VERSION $RELEASE_TYPE) | |
| sed -i 's|\("version": "\)[^"]*\("\)$|'"\1$VERSION_NEXT\2|;" $DOC_FILE | |
| echo $VERSION_NEXT >VERSION | |
| git commit -am "${VERSION_NEXT}" | |
| git push | |
| git tag "${VERSION_NEXT}" -m "${VERSION_NEXT}" | |
| git push origin "${VERSION_NEXT}" |