-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.25 KB
/
flatpak.yml
File metadata and controls
46 lines (39 loc) · 1.25 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
45
46
name: Flatpak Build
on:
push:
branches: [ "main" ]
pull_request:
branches:
- main
permissions:
contents: write
jobs:
flatpak:
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08
options: --privileged
steps:
- uses: actions/checkout@v4
- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: cosmic-utils-enroll.flatpak
manifest-path: flatpak/org.cosmic_utils.enroll.yml
cache-key: flatpak-builder-${{ github.sha }}
- name: Get version
id: get_version
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
echo "VERSION=$(awk -F '"' '/^\[package\]/ {flag=1} /^version/ && flag {print $2; exit}' Cargo.toml)" >> $GITHUB_ENV
- name: Create Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
name: ${{ env.VERSION }}
files: cosmic-utils-enroll.flatpak
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}