-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.7 KB
/
mirror_to_distributables.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
name: Update Distributables Branch
on:
push:
branches:
- main
workflow_dispatch: # Allows manual triggering
jobs:
update_distributables:
runs-on: ubuntu-latest
steps:
- name: Check out main branch
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all branches and history
- name: Set up git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Delete all contents in distributables branch
run: |
git checkout distributables || git checkout -b distributables
git rm -rf . # Remove all files in distributables branch
- name: Create pmma directory in distributables branch
run: mkdir -p pmma
- name: Copy contents from main branch
run: |
git checkout main -- cython_src python_src shaders resources __init__.py c_setup.py setup.py requirements.txt pyproject.toml MANIFEST.in LICENSE README.md
cp -r cython_src pmma/
cp -r python_src pmma/
cp -r shaders pmma/
cp -r resources pmma/
cp __init__.py pmma/__init__.py
cp c_setup.py pmma/c_setup.py
- name: Delete original files in distributables branch
run: |
rm -rf cython_src python_src shaders resources __init__.py c_setup.py
- name: Stage all changes (including deletions)
run: git add -A
- name: Commit and push changes to distributables branch
run: |
git add pmma
git commit -m "Update distributables branch with latest pmma content"
git push origin distributables --force