-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (77 loc) · 2.42 KB
/
build.yaml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
on:
push:
branches: [master]
tags:
- 'v*'
pull_request:
workflow_dispatch:
name: Build Packages
jobs:
flatpak:
name: Flatpak Build
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-44
options: --privileged
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: Redot.flatpak
manifest-path: org.redotengine.Redot.yaml
cache-key: flatpak-builder-${{ github.sha }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Redot.flatpak
path: Redot.flatpak
snap:
name: Snapcraft Build
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
- name: Install LXD
uses: canonical/setup-lxd@main
- name: Snapcraft Build
run: |
snapcraft
mv redot_*.snap Redot.snap
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Redot.snap
path: Redot.snap
release:
name: Create Release
needs: [flatpak, snap]
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
runs-on: ubuntu-latest
steps:
- name: Get Redot Release Tag
run: |
VERSION="${{ github.ref_name }}"
VERSION="${VERSION#v}"
echo VERSION=${VERSION} >> $GITHUB_ENV
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.ref_name }}
body: |
Flatpak and Snapcraft builds for Redot ${{ env.VERSION }}
- [Source code](https://github.com/Redot-Engine/redot-engine/releases/tag/redot-${{ env.VERSION }})
- [Snap Store](https://snapcraft.io/redot)
<!-- - [FlatHub](https://flathub.org/apps/details/org.redotengine.Redot) -->
draft: false
prerelease: ${{ startsWith(github.ref_name, 'v') && (contains(github.ref, '-beta') || contains(github.ref, '-rc')) }}
files: |
Redot.flatpak/Redot.flatpak
Redot.snap/Redot.snap