forked from FreeCAD/FreeCAD-Bundle
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (44 loc) · 1.71 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
45
46
47
48
49
50
# 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 20 * * 2"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
tag: ["weekly-builds"]
branch: ["flavor"]
steps:
- name: Run a multi-line script
run: |
git clone https://github.com/${GITHUB_REPOSITORY_OWNER}/FreeCAD
touch freecad_version.txt
wget https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${GITHUB_REF##*/}/make_version_file.py
wget https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${GITHUB_REF##*/}/disable_git_info.patch
cd FreeCAD
git checkout ${{ matrix.branch }}
git submodule update --init
python ../make_version_file.py ../freecad_version.txt
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config user.name 'github-actions[bot]'
git apply ../disable_git_info.patch
git commit -a -m "Disable git info write to Version.h"
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_name: Ondsel-Development/FreeCAD
repo_token: ${{ secrets.GH_TOKEN_FC }}
file: freecad*
tag: ${{ matrix.tag }}
overwrite: true
file_glob: true