v2.15.4 #30
Workflow file for this run
This file contains 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: Add Release Assets | |
on: | |
release: | |
types: [published] | |
jobs: | |
asset: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ ubuntu-latest ] | |
php: [ "7.4", "8.0", "8.2" ] | |
name: Upload Release Assets | |
steps: | |
- id: getTag | |
name: Get Tag | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Install Dependencies | |
uses: nick-invision/retry@v1 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: composer remove --no-update --dev cache/filesystem-adapter && composer install --no-dev --prefer-dist | |
- name: Create Archive | |
run: | | |
zip -r ${fileName} . && | |
zip -d ${fileName} ".git*" || true && | |
zip -d ${fileName} "tests*" || true && | |
zip -d ${fileName} "docs*" || true && | |
zip -d ${fileName} "phpcs.xml.dist" || true && | |
zip -d ${fileName} "phpunit.xml.dist" || true && | |
zip -d ${fileName} "tests*" || true && | |
zip -d ${fileName} "examples*" || true | |
env: | |
fileName: google-api-php-client-${{ steps.tagName.outputs.tag }}-PHP${{ matrix.php }}.zip | |
- name: Upload Release Archive | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./google-api-php-client-${{ steps.tagName.outputs.tag }}-PHP${{ matrix.php }}.zip | |
asset_name: google-api-php-client-${{ steps.tagName.outputs.tag }}-PHP${{ matrix.php }}.zip | |
asset_content_type: application/zip |