Skip to content

Release AppImage

Release AppImage #1075

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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ steps.param.outputs.owner }}
repo: ${{ steps.param.outputs.repo }}
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
}
}
}
}
}
jq_extract: >+
"vim_tag=" + .data.vim.refs.edges[0].node.name,
"appimage_tag=" + .data.appimage.refs.edges[0].node.name
run: |
gh api graphql -F owner="$owner" -F repo="$repo" -f query="$query" --jq "$jq_extract" | \
tee -a "$GITHUB_ENV"
- name: Check updates
id: check-updates
run: |
printf >> "$GITHUB_OUTPUT" '%s\n' \
"appimagetag=${appimage_tag}" \
"updated=$([[ ${appimage_tag} != ${vim_tag} ]] && echo true)"
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 \
gcc-10
- 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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.commit.outputs.tag_name }}
run: |
gh release create "$tag_name" \
*.AppImage *.zsync \
-F release.body -t "Vim: $tag_name"