-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.13 KB
/
release.yml
File metadata and controls
44 lines (39 loc) · 1.13 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
name: Create Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get version from fxmanifest.lua
id: get_version
shell: bash
run: |
version=$(grep "git_version" fxmanifest.lua | awk -F"'" '{print $2}')
echo "Found version: $version"
if [ ! -z "$version" ]; then
echo "version=$version" >> "$GITHUB_OUTPUT"
else
echo "Error: Version not found in fxmanifest.lua"
exit 1
fi
- name: Create ZIP archive
run: |
zip -r sure_lib.zip . -x ".git/*" ".github/*" "*.md" "LICENSE"
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "sure_lib.zip"
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false
generateReleaseNotes: true
tag: v${{ steps.get_version.outputs.version }}
name: "Release v${{ steps.get_version.outputs.version }}"