Tests #36
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: Build PHAR | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-agent: | |
| name: Build Agent | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Internal github app token | |
| uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} | |
| private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| fetch-depth: 0 | |
| ref: ${{ github.head_ref || github.ref }} | |
| - name: Setup PHP for agent dependencies | |
| uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4 | |
| with: | |
| php-version: '7.2' | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| working-directory: agent | |
| run: composer update --no-progress --no-interaction --prefer-dist | |
| - name: Setup PHP for Box | |
| uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4 | |
| with: | |
| php-version: '8.4' | |
| tools: box | |
| ini-values: phar.readonly=0 | |
| - name: Build PHAR | |
| run: scripts/build.sh | |
| - name: Setup PHP for PHAR test | |
| uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4 | |
| with: | |
| php-version: '7.2' | |
| - name: Test PHAR | |
| run: php bin/sentry-agent help | |
| - name: Commit PHAR | |
| uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4 | |
| with: | |
| add: "bin/sentry-agent bin/sentry-agent.sig" | |
| message: "Add PHAR artifact" | |
| default_author: github_actions |