Skip to content

Release AppImage

Release AppImage #731

Workflow file for this run

name: Release AppImage
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
check-updates-job:
runs-on: ubuntu-latest
outputs:
updated: ${{ steps.check-updates.outputs.updated }}
appimagetag: ${{ steps.check-updates.outputs.appimagetag }}
steps:
- name: Set up param
id: param
run: awk -F/ '{print"owner="$1"\nrepo="$2}' <<< "${{ github.repository }}" >> "$GITHUB_OUTPUT"
- name: Get latest tags
id: latest-tags
uses: octokit/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
query: |
query($owner:String!,$repo:String!) {
appimage: repository(owner:$owner, name:$repo) {
refs(refPrefix:"refs/tags/", last:1) {
edges {
node {
name
}
}
}
}
vim: repository(owner:"vim", name:"vim") {
refs(refPrefix:"refs/tags/", last:1) {
edges {
node {
name
}
}
}
}
}
owner: ${{ steps.param.outputs.owner }}
repo: ${{ steps.param.outputs.repo }}
- name: Check updates
id: check-updates
run: |
appimage_tag=${{ fromJSON(steps.latest-tags.outputs.data).appimage.refs.edges[0].node.name }}
vim_tag=${{ fromJSON(steps.latest-tags.outputs.data).vim.refs.edges[0].node.name }}
echo "appimagetag=${appimage_tag}" >> "$GITHUB_OUTPUT"
echo "updated=$([[ ${appimage_tag} != ${vim_tag} ]] && echo true)" >> "$GITHUB_OUTPUT"
create-appimage-job:
runs-on: ubuntu-20.04
needs: check-updates-job
if: needs.check-updates-job.outputs.updated == 'true'
env:
CC: gcc
TERM: xterm
DISPLAY: ':99'
DEBIAN_FRONTEND: noninteractive
VIM_REF: ${{ needs.check-updates-job.outputs.appimagetag }}
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt update && sudo apt install -y \
autoconf \
lcov \
gettext \
libcanberra-dev \
libperl-dev \
python-dev \
python3.8-dev \
liblua5.3-dev \
lua5.3 \
ruby-dev \
tcl-dev \
cscope \
libgtk-3-dev \
desktop-file-utils \
libtool-bin \
at-spi2-core \
libsodium-dev
- name: Update Vim
run: |
git submodule update --init
git submodule update --remote
- name: Set up system
run: |
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
sudo bash vim/ci/setup-xvfb.sh
- name: Build Vim
run: bash scripts/build_vim.sh
- name: Vim Version
run: |
vim/src/vim/vim --version
vim/src/gvim/vim --version
- name: Test Vim
timeout-minutes: 20
run: |
(
cd vim/src/gvim
make test
)
# dump failed screen tests
bash scripts/dump_failed_screentests.sh
- name: Create GVim AppImage
run: bash -e scripts/appimage.sh GVim
- name: Create Vim AppImage
run: bash -e scripts/appimage.sh Vim
- name: Commit and push
id: commit
run: |
tag_name=$(git -C vim describe --tags --abbrev=0)
echo "tag_name=${tag_name}" >> "$GITHUB_OUTPUT"
vim_summary=$(git submodule summary vim)
workflow_url=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin "https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}"
git commit -m "Vim: ${tag_name}" -m "${vim_summary}" -m "${workflow_url}" vim
git tag -f "${tag_name}" -m "Vim: ${tag_name}"
git push --follow-tags -u origin "${GITHUB_REF_NAME}"
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: release.body
name: 'Vim: ${{ steps.commit.outputs.tag_name }}'
tag_name: ${{ steps.commit.outputs.tag_name }}
files: |
*.AppImage
*.zsync