I'm one with the cloud ☁️ (#130)
This commit is contained in:
@@ -2,20 +2,41 @@ on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
name: "Build for Windows"
|
||||
name: CI
|
||||
concurrency:
|
||||
group: release-${{ github.sha }}
|
||||
jobs:
|
||||
flatpak:
|
||||
name: "Flatpak"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: bilelmoussaoui/flatpak-github-actions:gnome-44
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Flatpak Builder
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: hu.kramo.Cartridges.Devel.flatpak
|
||||
manifest-path: flatpak/hu.kramo.Cartridges.Devel.json
|
||||
cache-key: flatpak-builder-${{ github.sha }}
|
||||
|
||||
windows:
|
||||
name: "Build"
|
||||
name: Build for Windows
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: MSYS2
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: UCRT64
|
||||
update: true
|
||||
install: mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-libadwaita mingw-w64-ucrt-x86_64-python-gobject mingw-w64-ucrt-x86_64-python-yaml mingw-w64-ucrt-x86_64-python-requests mingw-w64-ucrt-x86_64-python-pillow mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-ca-certificates mingw-w64-ucrt-x86_64-meson git
|
||||
|
||||
- name: Compile
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
@@ -23,10 +44,12 @@ jobs:
|
||||
ninja -C _build install
|
||||
pacman --noconfirm -Rs mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-meson git
|
||||
find /ucrt64/share/locale/ -type f ! -name "*cartridges.mo" -delete
|
||||
|
||||
- name: "Inno Setup"
|
||||
run: iscc ".\_build\Cartridges.iss"
|
||||
|
||||
- name: "Upload Artifact"
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "Installer"
|
||||
path: "_build/Output/Cartridges Setup.exe"
|
||||
name: Windows Installer
|
||||
path: _build/Output/Cartridges Setup.exe
|
||||
19
.github/workflows/flatpak-builder.yml
vendored
19
.github/workflows/flatpak-builder.yml
vendored
@@ -1,19 +0,0 @@
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
name: CI
|
||||
jobs:
|
||||
flatpak:
|
||||
name: "Flatpak"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: bilelmoussaoui/flatpak-github-actions:gnome-44
|
||||
options: --privileged
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: hu.kramo.Cartridges.Devel.flatpak
|
||||
manifest-path: flatpak/hu.kramo.Cartridges.Devel.json
|
||||
cache-key: flatpak-builder-${{ github.sha }}
|
||||
38
.github/workflows/publish-release.yml
vendored
38
.github/workflows/publish-release.yml
vendored
@@ -1,11 +1,13 @@
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
# tags:
|
||||
# - 'v(\d|\.)*'
|
||||
name: "Publish Release"
|
||||
tags:
|
||||
"*"
|
||||
name: Publish Release
|
||||
concurrency:
|
||||
group: release-${{ github.sha }}
|
||||
jobs:
|
||||
publish-release:
|
||||
name: Publish Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -14,10 +16,30 @@ jobs:
|
||||
- name: Download workflow artifact
|
||||
uses: dawidd6/action-download-artifact@v2.27.0
|
||||
with:
|
||||
workflow: windows.yml
|
||||
workflow_conclusion: success
|
||||
workflow: ci.yml
|
||||
commit: ${{ github.sha }}
|
||||
|
||||
- name: "Publish Release"
|
||||
- name: Get release notes
|
||||
shell: python
|
||||
run: |
|
||||
import re, textwrap
|
||||
open_file = open("./data/hu.kramo.Cartridges.metainfo.xml.in", "r", encoding="utf-8")
|
||||
string = open_file.read()
|
||||
open_file.close()
|
||||
string = re.findall("<release.*>\s*<description.*>\n([\s\S]*?)\s*</description>\s*<\/release>", string)[0]
|
||||
string = textwrap.dedent(string)
|
||||
open_file = open("release_notes", "w", encoding="utf-8")
|
||||
open_file.write(string)
|
||||
open_file.close()
|
||||
|
||||
- name: Get tag name
|
||||
id: get_tag_name
|
||||
run: echo tag_name=${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Publish release
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
with:
|
||||
files: "Cartridges Setup.exe"
|
||||
files: Windows Installer/Cartridges Setup.exe
|
||||
fail_on_unmatched_files: true
|
||||
tag_name: ${{ steps.get_tag_name.outputs.tag_name }}
|
||||
body_path: release_notes
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
ignore=importers
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
disable=raw-checker-failed,
|
||||
|
||||
@@ -23,7 +23,7 @@ The project can be translated on [Weblate](https://hosted.weblate.org/engage/car
|
||||
|
||||
## For Windows
|
||||
1. Install [MSYS2](https://www.msys2.org/).
|
||||
2. From the MSYS2 shell, install the required dependencies listed [here](https://github.com/kra-mo/cartridges/blob/main/.github/workflows/windows.yml).
|
||||
2. From the MSYS2 shell, install the required dependencies listed [here](https://github.com/kra-mo/cartridges/blob/main/.github/workflows/ci.yml).
|
||||
3. Build it via Meson.
|
||||
|
||||
## Meson
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
[circle-url]: https://circle.gnome.org
|
||||
[circle-image]: https://circle.gnome.org/assets/button/badge.svg
|
||||
[github-actions-url]: https://github.com/kra-mo/cartridges
|
||||
[github-actions-image]: https://github.com/kra-mo/cartridges/actions/workflows/flatpak-builder.yml/badge.svg
|
||||
[github-actions-image]: https://github.com/kra-mo/cartridges/actions/workflows/ci.yml/badge.svg
|
||||
[code-style-url]: https://github.com/psf/black
|
||||
[code-style-image]: https://img.shields.io/badge/code%20style-black-000000?style=flat
|
||||
[weblate-url]: https://hosted.weblate.org/engage/cartridges/
|
||||
|
||||
Reference in New Issue
Block a user