forked from linuxmint/webapp-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (58 loc) · 1.92 KB
/
deploy.yml
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
name: Deploy
on:
release:
types: [published]
permissions:
contents: read
jobs:
flatpak:
permissions:
# Write permission is required to create a GitHub release
contents: write
pull-requests: read
name: "Flatpak"
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:kde-6.7
options: --privileged
steps:
- name: "Set Version"
shell: bash
run: |
APP_VERSION=${GITHUB_REF##*/}
APP_VERSION="${APP_VERSION:1}"
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
echo "APP_VERSION=\"$APP_VERSION\"" > src/version.py
file=app/share/metainfo/releases/io.github.junalmeida.webapps_manager.releases.xml
content="\t<release version=\"$APP_VERSION\" date=\"$(date +%Y-%m-%d)\"/>"
echo $content
C=$(echo $content | sed 's/\//\\\//g')
sed "/<\/releases>/ s/.*/${C}\n&/" $file > $file.tmp
mv $file.tmp $file
- uses: actions/checkout@v4
- uses: flatpak/flatpak-github-actions/flatpak-builder@master
name: "Build"
with:
upload-artifact: false
bundle: io.github.junalmeida.webapps_manager.flatpak
manifest-path: io.github.junalmeida.webapps_manager.json
cache-key: flatpak-builder-${{ github.sha }}
- uses: release-drafter/release-drafter@v6
with:
disable-autolabeler: true
name: v${ env.APP_VERSION }
tag: v${ env.APP_VERSION }
version: ${ env.APP_VERSION }
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: |
**/io.github.junalmeida.webapps_manager.flatpak
# - uses: flatpak/flatpak-github-actions/flat-manager@v6
# name: "Deploy"
# with:
# repository: flathub
# flat-manager-url: https://flatpak-api.elementary.io
# token: some_very_hidden_token