-
Notifications
You must be signed in to change notification settings - Fork 67
56 lines (53 loc) · 1.79 KB
/
sourcefile.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
name: All Source Files
on:
push:
release:
types: [published, edited]
jobs:
check_commit_msg:
outputs:
commit_message: ${{ steps.get_message.outputs.message }}
name: Check if the workflow has been disabled.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get commit message
id: get_message
run: |
echo "message=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_OUTPUT
linux:
needs: check_commit_msg
name: All Source Files
runs-on: ubuntu-latest
steps:
- name: Install git
run: |
sudo apt-get update
sudo apt-get install -y git
- name: Get the version
id: get_version
shell: bash
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: Checking out sources
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Create 7z Release
uses: DuckSoft/[email protected]
with:
pathSource: ./
pathTarget: ./Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z
path: Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
if: startsWith(github.event.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z
asset_name: Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z
tag: ${{ github.ref }}
overwrite: true