2022-03-31 20:58:57 +00:00
|
|
|
# This workflow will create a release and store builds to it when an x.y.z tag is pushed
|
|
|
|
|
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*.*.*'
|
|
|
|
|
2022-09-04 21:43:03 +00:00
|
|
|
env:
|
|
|
|
ENEMIZER_VERSION: 7.1
|
|
|
|
APPIMAGETOOL_VERSION: 13
|
|
|
|
|
2022-03-31 20:58:57 +00:00
|
|
|
jobs:
|
|
|
|
create-release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set env
|
|
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV # tag x.y.z will become "Archipelago x.y.z"
|
|
|
|
- name: Create Release
|
2024-03-13 07:25:51 +00:00
|
|
|
uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a
|
2022-03-31 20:58:57 +00:00
|
|
|
with:
|
|
|
|
draft: true # don't publish right away, especially since windows build is added by hand
|
|
|
|
prerelease: false
|
|
|
|
name: Archipelago ${{ env.RELEASE_VERSION }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
# build-release-windows: # this is done by hand because of signing
|
|
|
|
# build-release-macos: # LF volunteer
|
|
|
|
|
2023-03-13 23:04:34 +00:00
|
|
|
build-release-ubuntu2004:
|
|
|
|
runs-on: ubuntu-20.04
|
2022-03-31 20:58:57 +00:00
|
|
|
steps:
|
|
|
|
- name: Set env
|
|
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
# - code below copied from build.yml -
|
2024-03-13 07:25:51 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-31 20:58:57 +00:00
|
|
|
- name: Install base dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt -y install build-essential p7zip xz-utils wget libglib2.0-0
|
|
|
|
sudo apt -y install python3-gi libgirepository1.0-dev # should pull dependencies for gi installation below
|
|
|
|
- name: Get a recent python
|
2024-03-13 07:25:51 +00:00
|
|
|
uses: actions/setup-python@v5
|
2022-03-31 20:58:57 +00:00
|
|
|
with:
|
2024-11-29 19:07:14 +00:00
|
|
|
python-version: '3.12'
|
2022-03-31 20:58:57 +00:00
|
|
|
- name: Install build-time dependencies
|
|
|
|
run: |
|
2024-11-29 19:07:14 +00:00
|
|
|
echo "PYTHON=python3.12" >> $GITHUB_ENV
|
2022-09-04 21:43:03 +00:00
|
|
|
wget -nv https://github.com/AppImage/AppImageKit/releases/download/$APPIMAGETOOL_VERSION/appimagetool-x86_64.AppImage
|
2022-03-31 20:58:57 +00:00
|
|
|
chmod a+rx appimagetool-x86_64.AppImage
|
|
|
|
./appimagetool-x86_64.AppImage --appimage-extract
|
|
|
|
echo -e '#/bin/sh\n./squashfs-root/AppRun "$@"' > appimagetool
|
|
|
|
chmod a+rx appimagetool
|
|
|
|
- name: Download run-time dependencies
|
|
|
|
run: |
|
2022-09-04 21:43:03 +00:00
|
|
|
wget -nv https://github.com/Ijwu/Enemizer/releases/download/$ENEMIZER_VERSION/ubuntu.16.04-x64.7z
|
2022-03-31 20:58:57 +00:00
|
|
|
7za x -oEnemizerCLI/ ubuntu.16.04-x64.7z
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2022-09-04 21:43:03 +00:00
|
|
|
# pygobject is an optional dependency for kivy that's not in requirements
|
2023-02-07 08:09:43 +00:00
|
|
|
# charset-normalizer was somehow incomplete in the github runner
|
2022-03-31 20:58:57 +00:00
|
|
|
"${{ env.PYTHON }}" -m venv venv
|
|
|
|
source venv/bin/activate
|
2023-03-25 18:54:42 +00:00
|
|
|
"${{ env.PYTHON }}" -m pip install --upgrade pip PyGObject charset-normalizer
|
|
|
|
python setup.py build_exe --yes bdist_appimage --yes
|
2022-03-31 20:58:57 +00:00
|
|
|
echo -e "setup.py build output:\n `ls build`"
|
|
|
|
echo -e "setup.py dist output:\n `ls dist`"
|
|
|
|
cd dist && export APPIMAGE_NAME="`ls *.AppImage`" && cd ..
|
|
|
|
export TAR_NAME="${APPIMAGE_NAME%.AppImage}.tar.gz"
|
2024-06-12 16:55:48 +00:00
|
|
|
(cd build && DIR_NAME="`ls | grep exe`" && mv "$DIR_NAME" Archipelago && tar -cv Archipelago | gzip -8 > ../dist/$TAR_NAME && mv Archipelago "$DIR_NAME")
|
2022-03-31 20:58:57 +00:00
|
|
|
echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV
|
|
|
|
echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
|
|
|
|
# - code above copied from build.yml -
|
|
|
|
- name: Add to Release
|
2024-03-13 07:25:51 +00:00
|
|
|
uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a
|
2022-03-31 20:58:57 +00:00
|
|
|
with:
|
|
|
|
draft: true # see above
|
|
|
|
prerelease: false
|
|
|
|
name: Archipelago ${{ env.RELEASE_VERSION }}
|
|
|
|
files: |
|
|
|
|
dist/*
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|