Add RPC observer hook and schema generation fixes #3353
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: Continuous Delivery | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| versioning: | |
| description: "Versioning" | |
| default: minor | |
| required: true | |
| push: | |
| branches: | |
| - main | |
| pull_request_target: | |
| types: [labeled, opened, synchronize, reopened, closed] | |
| pull_request: | |
| types: [labeled, opened, synchronize, reopened, closed] | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| name: Create releases or snapshot | |
| runs-on: ubuntu-22.04 | |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'autorelease')) || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == false && contains(github.event.pull_request.labels.*.name, 'snapshot')) | |
| # Currently unused, we do everything within the same job. | |
| outputs: | |
| VERSION_TAG: ${{ steps.publish_release.outputs.VERSION_TAG }} | |
| SNAPSHOT_OR_RELEASE: ${{ steps.publish_release.outputs.SNAPSHOT_OR_RELEASE }} | |
| steps: | |
| - name: Remove snapshot label | |
| if: contains(github.event.pull_request.labels.*.name, 'snapshot') | |
| run: | | |
| curl --silent --fail \ | |
| -X DELETE \ | |
| -H 'Accept: application/vnd.github.v3+json' \ | |
| -H 'Authorization: token ${{ github.token }}' \ | |
| 'https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels/snapshot' | |
| - uses: actions/checkout@v3 | |
| if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/checkout@v3 | |
| if: github.event_name == 'pull_request_target' | |
| with: | |
| fetch-depth: 0 | |
| # See: https://github.com/actions/checkout/issues/518 | |
| ref: "refs/pull/${{ github.event.number }}/merge" | |
| # currently needed only for .npmrc to have a registry URL. | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: "16.x" | |
| registry-url: "https://registry.npmjs.org" | |
| - uses: ./.github/actions/setup | |
| - name: Configure git | |
| run: | | |
| git config --global user.email "silviogutierrez@gmail.com" | |
| git config --global user.name "Silvio J. Gutierrez" | |
| - name: Publish release | |
| id: publish_release | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }} | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ] | |
| then | |
| nix-shell --command "scripts/release.sh --versioning ${{ github.event.inputs.versioning }}" | |
| cd website | |
| scripts/deploy.sh | |
| elif [ "${{ github.event.pull_request.merged }}" = "true" ] && [ "${{ contains(github.event.pull_request.labels.*.name, 'autorelease') }}" = "true" ] | |
| then | |
| nix-shell --command "scripts/release.sh --versioning patch" | |
| cd website | |
| scripts/deploy.sh | |
| else | |
| nix-shell --command "scripts/release.sh --versioning snapshot" | |
| fi |