mirror of
https://github.com/simple64/simple64.git
synced 2026-11-18 15:14:02 +01:00
Better snap scripts
This commit is contained in:
1 parent
dce509080e
commit
f059d856ae
5 files changed
+39
-3
No files matched your search
@@ -10,6 +10,8 @@ on:
|
||||
|
||||
env:
|
||||
SNAPCRAFT_BUILD_ENVIRONMENT: host
|
||||
PYTHON_VERSION: "3.9"
|
||||
VERSION: "v2022.2.3"
|
||||
|
||||
jobs:
|
||||
build-snap:
|
||||
@@ -17,6 +19,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Get snapcraft login
|
||||
run: echo "$SNAPCRAFT_LOGIN" > $GITHUB_WORKSPACE/SNAPCRAFT_LOGIN.txt
|
||||
env:
|
||||
@@ -29,5 +36,7 @@ jobs:
|
||||
|
||||
- name: Run snapcraft
|
||||
run: |
|
||||
pip install requests
|
||||
export M64P_LINUX_URL=$(python3 ../scripts/get_linux_asset.py ${{ env.VERSION }})
|
||||
snapcraft --enable-experimental-extensions
|
||||
snapcraft upload --release=stable *.snap
|
||||
@@ -12,6 +12,7 @@ env:
|
||||
REGISTRY_USER: loganmc10
|
||||
IMAGE_REGISTRY: quay.io
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
PYTHON_VERSION: "3.9"
|
||||
VERSION: "v2022.2.3"
|
||||
|
||||
jobs:
|
||||
@@ -20,6 +21,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Log in to Quay.io
|
||||
uses: redhat-actions/podman-login@v1
|
||||
with:
|
||||
@@ -29,6 +35,8 @@ jobs:
|
||||
|
||||
- name: Run podman
|
||||
run: |
|
||||
pip install requests
|
||||
export M64P_LINUX_URL=$(python3 ../scripts/get_linux_asset.py ${{ env.VERSION }})
|
||||
podman build . --tag quay.io/loganmc10/m64p:latest --tag quay.io/loganmc10/m64p:${{ env.VERSION }}
|
||||
podman push quay.io/loganmc10/m64p:latest
|
||||
podman push quay.io/loganmc10/m64p:${{ env.VERSION }}
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import requests
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
resp = requests.get(
|
||||
f"https://api.github.com/repos/m64p/m64p/releases/tags/{sys.argv[1]}"
|
||||
)
|
||||
resp.raise_for_status()
|
||||
for item in resp.json()["assets"]:
|
||||
if "m64p-linux64" in item["name"]:
|
||||
print(item["browser_download_url"])
|
||||
break
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
name: m64p
|
||||
base: core20
|
||||
version: "v2022.2.3"
|
||||
version: $VERSION
|
||||
compression: lzo
|
||||
summary: An easy to use N64 emulator. Available for Windows and Linux
|
||||
description: |
|
||||
@@ -56,5 +56,5 @@ parts:
|
||||
override-prime: |
|
||||
snapcraftctl prime
|
||||
cp -f $SNAPCRAFT_STAGE/usr/lib/p7zip/7za $SNAPCRAFT_STAGE/usr/bin/7za
|
||||
source: https://github.com/m64p/m64p/releases/download/v2022.2.3/m64p-linux64-8fd720f.zip
|
||||
source: $M64P_LINUX_URL
|
||||
plugin: dump
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM registry.fedoraproject.org/fedora-toolbox:35
|
||||
|
||||
RUN wget -q https://github.com/m64p/m64p/releases/download/v2022.2.3/m64p-linux64-8fd720f.zip -O /m64p.zip && unzip /m64p.zip && rm /m64p.zip && \
|
||||
RUN wget -q ${M64P_LINUX_URL} -O /m64p.zip && unzip /m64p.zip && rm /m64p.zip && \
|
||||
ln -s /mupen64plus/mupen64plus-gui /usr/bin/start
|
||||
RUN dnf -y update && dnf -y install qt5-qtbase-gui qt5-qtwebsockets SDL2_net minizip-compat hidapi libatomic pipewire-libs p7zip && dnf clean all -y
|
||||
RUN ln -s /run/host/usr/share/vulkan/icd.d/nvidia_icd.json /usr/share/vulkan/icd.d/nvidia_icd.json && \
|
||||
|
||||
Reference in new issue
Block a user