-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.58 KB
/
release_scripts.yml
File metadata and controls
57 lines (45 loc) · 1.58 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: release_scripts
on:
release:
types: [published]
workflow_dispatch:
env:
DEST: fcecodec
jobs:
linux:
runs-on: ubuntu-latest
name: Ubuntu
steps:
- uses: actions/checkout@v6
# with:
# repository: "bfut/fcecodec"
- name: Get the version
run: |
export FCEC_VERS=$(grep "FCECVERS" 'src/fcelib/fcelib.h' | sed -n "s/^.*FCECVERS \"\s*\(\S*\)\".*$/\1/p")
echo "${FCEC_VERS}"
export FCEC_VERS_NODOT="${FCEC_VERS//./}"
echo "${FCEC_VERS_NODOT}"
echo "version=${FCEC_VERS_NODOT}" >> "$GITHUB_ENV"
- name: Create archive (fcecodec_scripts)
run: |
echo "${version}" ${{ env.version }}
git clone https://github.com/bfut/PyScripts utils/bfut_PyScripts
rm -rf utils/bfut_PyScripts/.git
7z a -tzip "${{ env.DEST }}${{ env.version }}_scripts.zip" \
utils/bfut_PyScripts/* \
scripts/* \
tests/fce/Snowman_car.fce \
tests/fce/Snowman_README.txt \
python/README.md \
README.md
ls -lg
# Uploading zip artifact to Github Actions creates a nested zip at this time. Hence...
# Extract archive to folder, subsequently upload folder as artifact
7z x -y "${{ env.DEST }}${{ env.version }}_scripts.zip" -o"${{ env.DEST }}${{ env.version }}_scripts"
- name: Store archive (fcecodec_scripts)
uses: actions/upload-artifact@v6
with:
name: "${{ env.DEST }}${{ env.version }}_scripts"
path: "${{ env.DEST }}${{ env.version }}_scripts"
compression-level: 9
retention-days: 7