-
Notifications
You must be signed in to change notification settings - Fork 18
59 lines (50 loc) · 2 KB
/
remote_release.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Remote Tagging
on:
repository_dispatch:
types: [update-tag]
permissions:
contents: write
repository-projects: write
jobs:
submodule:
name: Update submodule and create tag
runs-on: Ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Update submodule
run: |
git submodule init
git submodule update --recursive --remote
cd examples/open-simulation-interface
git checkout ${{ github.event.client_payload.tag }}
cd ../..
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "git submodule updated"
continue-on-error: true
- name: Create Antora tag
run: git tag x-antora-${{ github.event.client_payload.tag }}
- name: Create release tag
run: |
REPO_TAG="v$(sed -rn 's/VERSION_MAJOR = (.+)/\1/p' VERSION).$(sed -rn 's/VERSION_MINOR = (.+)/\1/p' VERSION).$(sed -rn 's/VERSION_PATCH = (.+)/\1/p' VERSION)${{ github.event.client_payload.suffix }}"
git tag ${REPO_TAG}
- name: GitHub Push
uses: CasperWA/[email protected]
with:
# Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.MACHINE_USER_PAT }}
branch: master
# Determines if --tags is used
tags: true
force: true
unprotect_reviews: true
- name: Trigger examples creation
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.MACHINE_USER_PAT }}
event-type: examples-build
client-payload: '{"tag": "${{ github.event.client_payload.tag }}", "source_repo": "${{ github.event.client_payload.source_repo }}"}'