-
Notifications
You must be signed in to change notification settings - Fork 49
58 lines (54 loc) · 2.26 KB
/
CrossMix 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: CrossMix-OS Release
permissions:
id-token: "write"
contents: "write"
packages: "write"
pull-requests: "read"
on:
push:
tags:
- v*
jobs:
tagged-release:
name: Tagged release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get version
run: |
TAG="${{ github.ref_name }}"
echo "BUILD_VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Install 7-Zip
run: |
mkdir -p /home/runner/work/CrossMix-OS/tools
wget https://www.7-zip.org/a/7z2406-linux-x64.tar.xz -P /home/runner/work/CrossMix-OS/tools
tar xvf /home/runner/work/CrossMix-OS/tools/7z2406-linux-x64.tar.xz -C /home/runner/work/CrossMix-OS/tools
sudo cp /home/runner/work/CrossMix-OS/tools/7zz /usr/local/bin/
- name: Extract RetroArch cores
run: |
find /home/runner/work/CrossMix-OS/CrossMix-OS/RetroArch/.retroarch/cores -name "*.7z" -execdir 7zz x {} \; -execdir rm {} \;
- name: Cleaning image...
run: |
find /home/runner/work/CrossMix-OS/CrossMix-OS -type f -name ".gitkeep" -delete
rm -rf /home/runner/work/CrossMix-OS/CrossMix-OS/_assets
rm /home/runner/work/CrossMix-OS/CrossMix-OS/LICENSE
rm /home/runner/work/CrossMix-OS/CrossMix-OS/README.md
ls -la /home/runner/work/CrossMix-OS/CrossMix-OS
rm -rf /home/runner/work/CrossMix-OS/CrossMix-OS/.git
rm -rf /home/runner/work/CrossMix-OS/CrossMix-OS/.github
ls -la /home/runner/work/CrossMix-OS/CrossMix-OS
cd /home/runner/work/CrossMix-OS/CrossMix-OS
/usr/local/bin/7zz a RetroArch/default_config.7z RetroArch/retroarch.cfg RetroArch/.retroarch/config/*
- name: Zipping release
run: |
shopt -s dotglob
cd /home/runner/work/CrossMix-OS/CrossMix-OS
zip -r "/home/runner/work/CrossMix-OS/CrossMix-OS_v${{ env.BUILD_VERSION }}.zip" ./*
- name: Create Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
title: "CrossMix-OS v${{ env.BUILD_VERSION }}"
prerelease: false
files: "/home/runner/work/CrossMix-OS/CrossMix-OS_v${{ env.BUILD_VERSION }}.zip"
draft: true