-
-
Notifications
You must be signed in to change notification settings - Fork 15
38 lines (38 loc) · 1.44 KB
/
split_releases.yml
File metadata and controls
38 lines (38 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Push release tags on sub-repos
name: Push releases
on:
release:
types: [published]
jobs:
split-release:
name: Split release
strategy:
fail-fast: false
matrix:
library: ['Files', 'Data', 'Cookies', 'Session', 'Container', 'Archive']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get the tag name
uses: olegtarasov/get-tag@v2.1
id: tagName
- uses: actions/cache@v3
id: cache
with:
path: ./splitsh
key: ${{ runner.os }}-${{ hashFiles('**/composer.json') }}
- name: Install splitsh
if: steps.cache.outputs.cache-hit != 'true'
run: |
mkdir ./splitsh
wget https://github.com/splitsh/lite/releases/download/v1.0.1/lite_linux_amd64.tar.gz
tar -zxpf lite_linux_amd64.tar.gz --directory ./splitsh
- name: Update ${{ matrix.library }} repository
run: |
SHA1=`./splitsh/splitsh-lite --prefix=src/${{ matrix.library }} --origin=refs/tags/${{ steps.tagName.outputs.tag }}`
git remote add ${{ matrix.library }} https://${{ secrets.AUTH_TOKEN }}@github.com/alphazframework/${{ matrix.library }}
git push -f ${{ matrix.library }} ${SHA1}:master
git tag -d ${{ steps.tagName.outputs.tag }}
git tag ${{ steps.tagName.outputs.tag }} ${SHA1}
git push ${{ matrix.library }} ${{ steps.tagName.outputs.tag }}