Skip to content

Release Components #141

Release Components

Release Components #141

Workflow file for this run

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: Cone splitsh/lit
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
- 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: |
./dev/google-cloud split $GITHUB_REPOSITORY $RELEASE_TAG \
--splitsh=lite/ \
-t ${{ secrets.SPLIT_TOKEN }} \
--packagist-username=${{ vars.PACKAGIST_USERNAME }} \
--packagist-token=${{ secrets.PACKAGIST_TOKEN }}