Skip to content

Build Vim

Build Vim #1336

Workflow file for this run

name: Build Vim
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
arch: [x86, x64]
include:
- arch: x86
varch: i686
msystem: MINGW32
- arch: x64
varch: x86_64
msystem: MINGW64
steps:
- name: Initalize
shell: bash
run: |
git config --global core.autocrlf input
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-${{ matrix.varch }}-toolchain base-devel
msystem: ${{ matrix.msystem }}
path-type: inherit
- name: Update Vim
id: update
shell: msys2 {0}
run: |
./update-version.sh
if git diff --quiet HEAD PKGBUILD; then
echo "::set-output name=skip::yes"
else
echo "::set-output name=skip::no"
fi
- name: Build
if: steps.update.outputs.skip == 'no'
shell: msys2 {0}
run: |
makepkg -s --noconfirm
ls -l
- name: Upload Artifact
if: steps.update.outputs.skip == 'no'
uses: actions/upload-artifact@v2
with:
name: gvim-transparency-${{ matrix.varch }}
path: ./mingw-*.pkg.tar.zst
release:
runs-on: windows-latest
needs: [build]
strategy:
matrix:
arch: [x64]
include:
- arch: x64
varch: x86_64
msystem: MINGW64
steps:
- name: Initalize
shell: bash
run: |
git config --global core.autocrlf input
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-${{ matrix.varch }}-toolchain base-devel
msystem: ${{ matrix.msystem }}
path-type: inherit
- name: Update Vim
id: update
shell: msys2 {0}
run: |
./update-version.sh
if git diff --quiet HEAD PKGBUILD; then
echo "::set-output name=skip::yes"
else
echo "::set-output name=skip::no"
fi
- name: Commit/Push git
id: commit
if: steps.update.outputs.skip == 'no'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: msys2 {0}
run: |
git config --local user.name "mingw-gvim-transparency CI"
git config --local user.email "raa0121@users.noreply.github.com"
git remote set-url origin https://raa0121:${GITHUB_TOKEN}@github.com/raa0121/mingw-gvim-transparency.git
git add PKGBUILD
pkgver=$(grep pkgver= PKGBUILD | sed -e 's/pkgver=//')
echo "::set-output name=version::$pkgver"
git commit -m "v${pkgver}-1"
git push origin master
git tag ${pkgver}-1
git push origin ${pkgver}-1
- name: Download Artifact (x86_64)
if: steps.update.outputs.skip == 'no'
uses: actions/download-artifact@v2
with:
name: gvim-transparency-x86_64
- name: Download Artifact (i686)
if: steps.update.outputs.skip == 'no'
uses: actions/download-artifact@v2
with:
name: gvim-transparency-i686
- name: Create repo.db
if: steps.update.outputs.skip == 'no'
shell: msys2 {0}
run: |
repo-add mingw-raa0121.db.tar.gz ./mingw-w64-*gvim-transparency*.tar.*
- name: Create Release
if: steps.update.outputs.skip == 'no'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@9993ae85344fa542b3edb2533f97011277698cf6
with:
tag_name: ${{ steps.commit.outputs.version }}-1
name: ${{ steps.commit.outputs.version }}-1
draft: false
prerelease: false
files: |
./mingw-w64-x86_64-gvim-transparency*.tar.*
./mingw-w64-i686-gvim-transparency*.tar.*
./mingw-raa0121.db
./mingw-raa0121.files