Automate snap releases

This commit is contained in:
Logan McNaughton committed 2022-02-06 09:18:55 -07:00
1 parent 2cb1bb974d
commit a842630dee
3 files changed
+22 -17

No files matched your search

+4 -8
View File
@@ -1,17 +1,12 @@
name: Upload snap
on:
push:
branches:
- main
paths:
- "snap/**"
release:
workflow_dispatch:
env:
SNAPCRAFT_BUILD_ENVIRONMENT: host
PYTHON_VERSION: "3.9"
VERSION: "v2022.2.3"
jobs:
build-snap:
@@ -37,8 +32,9 @@ jobs:
- name: Run snapcraft
run: |
pip install requests
export M64P_LINUX_URL=$(python3 scripts/get_linux_asset.py ${{ env.VERSION }})
sed -i "s~M64PVERSION~${{ env.VERSION }}~g" snap/snapcraft.yaml
export M64P_VERSION=$(python3 scripts/get_release_version.py)
export M64P_LINUX_URL=$(python3 scripts/get_linux_asset.py $M64P_VERSION)
sed -i "s~M64PVERSION~$M64P_VERSION~g" snap/snapcraft.yaml
sed -i "s~M64PURL~$M64P_LINUX_URL~g" snap/snapcraft.yaml
snapcraft --enable-experimental-extensions
snapcraft upload --release=stable *.snap
+5 -9
View File
@@ -1,11 +1,7 @@
name: Upload toolbox container
on:
push:
branches:
- main
paths:
- "toolbox/**"
release:
workflow_dispatch:
env:
@@ -13,7 +9,6 @@ env:
IMAGE_REGISTRY: quay.io
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
PYTHON_VERSION: "3.9"
VERSION: "v2022.2.3"
jobs:
build-toolbox:
@@ -36,9 +31,10 @@ jobs:
- name: Run podman
run: |
pip install requests
export M64P_LINUX_URL=$(python3 ../scripts/get_linux_asset.py ${{ env.VERSION }})
export M64P_VERSION=$(python3 ../scripts/get_release_version.py)
export M64P_LINUX_URL=$(python3 ../scripts/get_linux_asset.py $M64P_VERSION)
sed -i "s~M64PURL~$M64P_LINUX_URL~g" Containerfile
podman build . --tag quay.io/loganmc10/m64p:latest --tag quay.io/loganmc10/m64p:${{ env.VERSION }}
podman build . --tag quay.io/loganmc10/m64p:latest --tag quay.io/loganmc10/m64p:$M64P_VERSION
podman push quay.io/loganmc10/m64p:latest
podman push quay.io/loganmc10/m64p:${{ env.VERSION }}
podman push quay.io/loganmc10/m64p:$M64P_VERSION
working-directory: toolbox