-
Notifications
You must be signed in to change notification settings - Fork 35
80 lines (77 loc) · 2.6 KB
/
main.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
# Copyright 2024 the Cartero authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later
on:
push:
branches:
- trunk
name: CI for Cartero
jobs:
Flatpak:
# needs: CreateRelease
name: "Flatpak Builder"
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-45
options: --privileged
steps:
- uses: actions/checkout@v4
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: es.danirod.Cartero.flatpak
manifest-path: build-aux/es.danirod.Cartero.json
cache-key: flatpak-builder-${{ github.sha }}
build-bundle: true
Deliver:
name: "Deliver Package"
runs-on: ubuntu-latest
needs: [Flatpak]
permissions : write-all
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: es.danirod.Cartero-x86_64
path: .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Changelog
id: changes
uses: heinrichreimer/action-github-changelog-generator@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release-${{ github.sha }}-${{ github.run_number }}
release_name: Release ${{ github.sha }}
body: |
Changes ${{ steps.changes.outputs.changelog }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./es.danirod.Cartero.flatpak
asset_name: es.danirod.Cartero.flatpak
asset_content_type: application/octet-stream