name: Release
run-name: Releasing app
on: [workflow_dispatch]
jobs:
    build-linux:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v3
            - name: Installing libraries
              run: sudo apt-get update && sudo apt-get -y -f install libwebkit2gtk-4.0-dev libgtk-3-dev git zip upx
            - name: Installing V
              run: git clone https://github.com/vlang/v && cd v && make && cd ..
            - name: Compiling Vebview.JS
              run: export V_LOC=./v && ./linux.sh
            - name: Exporting RELEASE_NAME
              run: echo "RELEASE_NAME=v$(date -u +%s)" >> $GITHUB_ENV
            - name: Creating Zip File
              run: zip -r linux.zip ./dist
            - uses: ncipollo/release-action@v1
              with:
                artifacts: "linux.zip"
                token: ${{ secrets.GITHUB_TOKEN }}
                tag: ${{ env.RELEASE_NAME }}
                name: ${{ env.RELEASE_NAME }}
                body: "This build was released with GitHub Actions"
                commit: ${{ github.sha }}