-
Notifications
You must be signed in to change notification settings - Fork 68
44 lines (38 loc) · 1.29 KB
/
source_creation.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
# This is a basic workflow to help you get started with Actions
name: source_creation
# Controls when the workflow will run
on:
schedule:
- cron: "* 0/4 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
tag: ["weekly-builds"]
branch: ["main"]
steps:
- name: Run a multi-line script
run: |
git clone https://github.com/FreeCAD/FreeCAD
touch freecad_version.txt
wget https://raw.githubusercontent.com/FreeCAD/FreeCAD-Bundle/${GITHUB_REF##*/}/make_version_file.py
cd FreeCAD
git checkout ${{ matrix.branch }}
git submodule update --init
python ../make_version_file.py ../freecad_version.txt
git archive HEAD -o ../freecad_source.tar
git submodule foreach --recursive \
"git archive HEAD --prefix=\$path/ -o \$sha1.tar && \
tar -A -f \$toplevel/../freecad_source.tar \$sha1.tar && \
rm \$sha1.tar"
gzip ../freecad_source.tar
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: freecad*
tag: ${{ matrix.tag }}
overwrite: true
file_glob: true