Release-plz #174
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: Release-plz | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| on: | |
| workflow_run: | |
| workflows: ["Build and Lint"] | |
| branches: ["master"] | |
| types: | |
| - completed | |
| jobs: | |
| release-plz-release: | |
| name: Release-plz release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| env: | |
| clang: '17' | |
| php_version: '8.2' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ env.php_version }} | |
| env: | |
| debug: true | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache LLVM and Clang | |
| id: cache-llvm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ runner.temp }}/llvm-${{ env.clang }} | |
| key: ubuntu-latest-llvm-${{ env.clang }} | |
| - name: Setup LLVM & Clang | |
| id: clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: ${{ env.clang }} | |
| directory: ${{ runner.temp }}/llvm-${{ env.clang }} | |
| cached: ${{ steps.cache-llvm.outputs.cache-hit }} | |
| - name: Configure Clang | |
| run: | | |
| echo "LIBCLANG_PATH=${{ runner.temp }}/llvm-${{ env.clang }}/lib" >> $GITHUB_ENV | |
| echo "LLVM_VERSION=${{ steps.clang.outputs.version }}" >> $GITHUB_ENV | |
| echo "LLVM_CONFIG_PATH=${{ runner.temp }}/llvm-${{ env.clang }}/bin/llvm-config" >> $GITHUB_ENV | |
| - name: Authenticate to crates.io | |
| uses: rust-lang/crates-io-auth-action@v1 | |
| id: auth | |
| - name: Run release-plz | |
| uses: release-plz/[email protected] | |
| with: | |
| command: release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }} | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| release-plz-pr: | |
| name: Release-plz PR | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| concurrency: | |
| group: release-plz-${{ github.ref }} | |
| cancel-in-progress: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Authenticate to crates.io | |
| uses: rust-lang/crates-io-auth-action@v1 | |
| id: auth | |
| - name: Run release-plz | |
| uses: release-plz/[email protected] | |
| with: | |
| command: release-pr | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }} | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} |