Build AppImage #744
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build AppImage | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download Postman | |
run: wget -c https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
- name: Download AppImageTool | |
run: | | |
wget -c $(wget -q https://api.github.com/repos/probonopd/go-appimage/releases/tags/continuous -O - | grep "appimagetool-.*-x86_64.AppImage\"" | tail -n 1 | cut -d '"' -f 4) | |
chmod +x appimagetool-*.AppImage | |
- name: Extract Postman | |
id: postman-version | |
run: | | |
tar zxf postman*.tar.gz | |
echo "::set-output name=VERSION::$(cat ./Postman/app/resources/app/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')" | |
- name: Postman Version | |
run: echo "Postman Version is ${{ steps.postman-version.outputs.VERSION }}" | |
- name: Create Desktop Shortcut | |
run: | | |
cp Postman/app/resources/app/assets/icon.png Postman/postman.png | |
mv Postman/Postman Postman/AppRun | |
cat > Postman/postman.desktop <<EOF | |
[Desktop Entry] | |
Version=1.0 | |
Name=Postman | |
GenericName=Postman | |
Exec=./AppRun %U | |
Terminal=false | |
Icon=postman | |
Type=Application | |
Categories=Network;WebBrowser; | |
EOF | |
- name: | |
run: | | |
./appimagetool-*.AppImage --appimage-extract | |
VERSION=${{ steps.postman-version.outputs.VERSION }} ARCH=x86_64 ./squashfs-root/AppRun Postman | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: Postman-${{ steps.postman-version.outputs.VERSION }} | |
path: Postman-*.AppImage | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: continous | |
files: Postman-*.AppImage |