-
Notifications
You must be signed in to change notification settings - Fork 0
155 lines (134 loc) · 3.88 KB
/
build-vim.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
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 "[email protected]"
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