I'm one with the cloud ☁️ (#130)
This commit is contained in:
@@ -2,20 +2,41 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
name: "Build for Windows"
|
name: CI
|
||||||
|
concurrency:
|
||||||
|
group: release-${{ github.sha }}
|
||||||
jobs:
|
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:
|
windows:
|
||||||
name: "Build"
|
name: Build for Windows
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: MSYS2
|
|
||||||
|
- name: Setup MSYS2
|
||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
msystem: UCRT64
|
msystem: UCRT64
|
||||||
update: true
|
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
|
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
|
- name: Compile
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
@@ -23,10 +44,12 @@ jobs:
|
|||||||
ninja -C _build install
|
ninja -C _build install
|
||||||
pacman --noconfirm -Rs mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-meson git
|
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
|
find /ucrt64/share/locale/ -type f ! -name "*cartridges.mo" -delete
|
||||||
|
|
||||||
- name: "Inno Setup"
|
- name: "Inno Setup"
|
||||||
run: iscc ".\_build\Cartridges.iss"
|
run: iscc ".\_build\Cartridges.iss"
|
||||||
|
|
||||||
- name: "Upload Artifact"
|
- name: "Upload Artifact"
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: "Installer"
|
name: Windows Installer
|
||||||
path: "_build/Output/Cartridges Setup.exe"
|
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 }}
|
|
||||||
58
.github/workflows/publish-release.yml
vendored
58
.github/workflows/publish-release.yml
vendored
@@ -1,23 +1,45 @@
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
tags:
|
||||||
# tags:
|
"*"
|
||||||
# - 'v(\d|\.)*'
|
name: Publish Release
|
||||||
name: "Publish Release"
|
concurrency:
|
||||||
|
group: release-${{ github.sha }}
|
||||||
jobs:
|
jobs:
|
||||||
publish-release:
|
publish-release:
|
||||||
runs-on: ubuntu-latest
|
name: Publish Release
|
||||||
steps:
|
runs-on: ubuntu-latest
|
||||||
- name: Checkout
|
steps:
|
||||||
uses: actions/checkout@v3
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Download workflow artifact
|
- name: Download workflow artifact
|
||||||
uses: dawidd6/action-download-artifact@v2.27.0
|
uses: dawidd6/action-download-artifact@v2.27.0
|
||||||
with:
|
with:
|
||||||
workflow: windows.yml
|
workflow: ci.yml
|
||||||
workflow_conclusion: success
|
commit: ${{ github.sha }}
|
||||||
|
|
||||||
- name: "Publish Release"
|
- name: Get release notes
|
||||||
uses: softprops/action-gh-release@v0.1.15
|
shell: python
|
||||||
with:
|
run: |
|
||||||
files: "Cartridges Setup.exe"
|
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: 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
|
ignore=importers
|
||||||
|
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
[MESSAGES CONTROL]
|
||||||
|
|
||||||
disable=raw-checker-failed,
|
disable=raw-checker-failed,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ The project can be translated on [Weblate](https://hosted.weblate.org/engage/car
|
|||||||
|
|
||||||
## For Windows
|
## For Windows
|
||||||
1. Install [MSYS2](https://www.msys2.org/).
|
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.
|
3. Build it via Meson.
|
||||||
|
|
||||||
## Meson
|
## Meson
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
[circle-url]: https://circle.gnome.org
|
[circle-url]: https://circle.gnome.org
|
||||||
[circle-image]: https://circle.gnome.org/assets/button/badge.svg
|
[circle-image]: https://circle.gnome.org/assets/button/badge.svg
|
||||||
[github-actions-url]: https://github.com/kra-mo/cartridges
|
[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-url]: https://github.com/psf/black
|
||||||
[code-style-image]: https://img.shields.io/badge/code%20style-black-000000?style=flat
|
[code-style-image]: https://img.shields.io/badge/code%20style-black-000000?style=flat
|
||||||
[weblate-url]: https://hosted.weblate.org/engage/cartridges/
|
[weblate-url]: https://hosted.weblate.org/engage/cartridges/
|
||||||
|
|||||||
Reference in New Issue
Block a user