actions: build appimage

This commit is contained in:
Dag Heyman 2019-09-18 15:02:55 +02:00
parent b5858a46d6
commit 32bf2eaf2b
2 changed files with 35 additions and 8 deletions

27
.github/workflows/appimage.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Build AppImage
on: [push]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Build docker image that produces the AppImage
run: |
export REF=$(echo ${GITHUB_REF} | tr / -)
docker build -t xenial-appimage -f docker/xenial-appimage/Dockerfile .
id=$(docker create --privileged xenial-appimage)
docker start --attach $id
docker cp $id:/yubioath-desktop/Yubico_Authenticator-x86_64.AppImage yubioath-desktop-${REF}.AppImage
- name: Push artifact to s3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
export REF=$(echo ${GITHUB_REF} | tr / -)
aws s3 mv yubioath-desktop-${REF}.AppImage s3://yubico-builds/yubioath-desktop/yubioath-desktop-${REF}.AppImage --acl public-read

View File

@ -24,23 +24,23 @@ ENV LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRA
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash \
&& eval "$(pyenv init -)" \
&& pyenv update \
&& pyenv install --force 3.6.5 \
&& pyenv global 3.6.5 \
&& wget https://github.com/thp/pyotherside/archive/1.5.3.tar.gz \
&& tar -xzvf 1.5.3.tar.gz \
&& echo "DEFINES += QT_NO_DEBUG_OUTPUT" >> pyotherside-1.5.3/src/src.pro \
&& cd pyotherside-1.5.3/src \
&& pyenv install --force 3.7.4 \
&& pyenv global 3.7.4 \
&& wget https://github.com/thp/pyotherside/archive/1.5.8.tar.gz \
&& tar -xzvf 1.5.8.tar.gz \
&& echo "DEFINES += QT_NO_DEBUG_OUTPUT" >> pyotherside-1.5.8/src/src.pro \
&& cd pyotherside-1.5.8/src \
&& qmake \
&& make \
&& make install
COPY . yubioath-desktop
RUN mkdir -p yubioath-desktop/appDir/usr \
&& eval "$(pyenv init -)" \
&& pyenv global 3.6.5 \
&& pyenv global 3.7.4 \
&& cd yubioath-desktop \
&& pip3 install --upgrade pip \
&& pip3 install -r requirements.txt \
&& cp -R /root/.pyenv/versions/3.6.5/* appDir/usr \
&& cp -R /root/.pyenv/versions/3.7.4/* appDir/usr \
&& apt-get download libykpers-1-1 \
&& dpkg -x libykpers*.deb appDir/ \
&& qmake \