Release Components #146
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: Release Components | |
on: | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Tag to release' | |
required: true | |
permissions: | |
contents: read | |
jobs: | |
release: | |
name: "Split and Release Components" | |
runs-on: ubuntu-latest | |
env: | |
LD_LIBRARY_PATH: /usr/local/lib | |
RELEASE_TAG: ${{ inputs.tag }} | |
steps: | |
- name: Clone libgit2 | |
uses: actions/checkout@master | |
with: | |
repository: libgit2/libgit2 | |
ref: v1.5.1 | |
path: libgit2 | |
- name: Install libgit2 | |
run: | | |
mkdir libgit2/build && cd libgit2/build | |
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local | |
sudo cmake --build . --target install | |
- name: Clone splitsh/lite | |
uses: actions/checkout@master | |
with: | |
repository: splitsh/lite | |
ref: v2.0.0 | |
path: lite | |
- name: Install splitsh-lite | |
run: | | |
cd lite | |
go build -o splitsh-lite github.com/splitsh/lite | |
pwd | |
- name: Checkout google/cloud | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
ini-values: memory_limit=2048M | |
- name: Install Dependencies | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: composer update -d dev | |
- id: getTag | |
name: Get Tag | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Run Subtree Split and Release | |
env: | |
RELEASE_TAG: ${{ inputs.tag != '' && inputs.tag || steps.getTag.outputs.tag }} | |
run: | | |
pwd | |
./dev/google-cloud split $GITHUB_REPOSITORY $RELEASE_TAG \ | |
--splitsh=./lite/splitsh-lite \ | |
-t ${{ secrets.SPLIT_TOKEN }} \ | |
--packagist-username=${{ vars.PACKAGIST_USERNAME }} \ | |
--packagist-token=${{ secrets.PACKAGIST_TOKEN }} |