Skip to content

Merge pull request #103 from cosmic-utils/0.5.5 #80

Merge pull request #103 from cosmic-utils/0.5.5

Merge pull request #103 from cosmic-utils/0.5.5 #80

Workflow file for this run

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: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}