Merge tag 'v4.1.0' of https://github.com/cloudflare/cloudflare-python #11
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
| # This workflow will download the nodejs based prism-cli | |
| # which this progeam uses for its testa | |
| name: Package prism | |
| env: | |
| TAR_REPRO_OPTS: '"--mtime=2024-01-01 00:00 UTC" --sort=name --owner=0 --group=0 --numeric-owner' | |
| TAR_NAME: ${{ github.event.repository.name }}-${{ github.ref_name }}-prism.tar.gz | |
| TAR_FILES: node_modules package.json package-lock.json cloudflare-spec.yml | |
| CHECKOUT_DIR: ${{ github.event.repository.name }}-${{ github.ref_name }} | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| vendor-tarball: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ${{ env.CHECKOUT_DIR }} | |
| - name: Set up node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "latest" | |
| - name: fetch Prism and deps | |
| run: npm install $(grep -m1 prism-cli scripts/mock | awk '{print $3}' | sed s/--package=//) | |
| working-directory: ${{ env.CHECKOUT_DIR }} | |
| # The spec is under a BSD licensw, its all good. see https://github.com/cloudflare/api-schemas | |
| - name: fetch cloudflare api spec | |
| run: wget $(yq -e '.openapi_spec_url' .stats.yml) -O cloudflare-spec.yml | |
| working-directory: ${{ env.CHECKOUT_DIR }} | |
| - name: Create Archive | |
| run: tar ${{ env.TAR_REPRO_OPTS }} -caf ${{ env.TAR_NAME }} ${{ env.TAR_FILES }} | |
| working-directory: ${{ env.CHECKOUT_DIR }} | |
| - name: release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ env.CHECKOUT_DIR }}/${{ env.TAR_NAME }} | |
| body: Prism tarball for tests for Gentoo Linux overlay package | |
| generate_release_notes: false | |
| fail_on_unmatched_files: true |