-
-
Notifications
You must be signed in to change notification settings - Fork 13
38 lines (32 loc) · 1.06 KB
/
release.yml
File metadata and controls
38 lines (32 loc) · 1.06 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
name: Release Addons
on:
push:
branches:
- master
pull_request:
types: [closed]
branches:
- master
jobs:
release:
if: github.event_name == 'push' || (github.event.pull_request.merged == true)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Extract version from plugin.cfg
id: get_version
run: |
version=$(grep '^version=' addons/godotvmf/plugin.cfg | cut -d= -f2 | tr -d '"')
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Create ZIP archive with version in name
run: |
zip -r addons-v${{ steps.get_version.outputs.version }}.zip addons
- name: Create GitHub release and upload archive
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.get_version.outputs.version }}
name: Release v${{ steps.get_version.outputs.version }}
files: addons-v${{ steps.get_version.outputs.version }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}