Skip to content

Commit 5ca649a

Browse files
committed
feat: merge checkPR workflow
1 parent 2eba027 commit 5ca649a

File tree

2 files changed

+20
-31
lines changed

2 files changed

+20
-31
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
name: build
22

3-
on: push
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- "*"
9+
pull_request:
10+
branches:
11+
- master
412

513
env:
614
PROJECT: lua-language-server
7-
BIN: bin
15+
BIN_DIR: bin
816

917
jobs:
1018
compile:
@@ -61,7 +69,7 @@ jobs:
6169
- uses: actions/upload-artifact@v2
6270
with:
6371
name: ${{ steps.vars.outputs.PKG_BASENAME }}
64-
path: ${{ env.BIN }}
72+
path: ${{ env.BIN_DIR }}
6573

6674
- name: Package tarballs
6775
if: startsWith(github.ref, 'refs/tags/')
@@ -74,31 +82,28 @@ jobs:
7482
mkdir -p ${STAGING}
7583
7684
# Copying binary and runtime files to staging area
77-
cp -r main.lua debugger.lua locale meta script ${{ env.BIN }} ${STAGING}
85+
cp -r main.lua debugger.lua locale meta script ${{ env.BIN_DIR }} ${STAGING}
7886
7987
# Creating release assets
8088
pushd "${STAGING}/" >/dev/null
81-
case "${{ matrix.job.target }}" in
82-
windows)
83-
7z -y a ${NAME} * | tail -2
84-
;;
85-
*)
86-
tar czf ${NAME} *
87-
;;
88-
esac;
89+
if [[ "${{ matrix.job.target }}" = windows ]]; then
90+
7z -y a ${NAME} * | tail -2
91+
else
92+
tar czf ${NAME} *
93+
fi
8994
popd >/dev/null
9095
9196
# Packaging submodules for homebrew distribution
9297
- name: Package submodules
9398
id: submodules
9499
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.job.target == 'macos' }}
95100
run: |
101+
STAGING=${{ steps.vars.outputs.PKG_STAGING }}
96102
PKG_SUBMOD_NAME="${{ env.PROJECT }}-${{ steps.vars.outputs.PKG_VERSION }}-submodules.zip"
97-
PKG_SUBMOD_PATH="${{ steps.vars.outputs.PKG_STAGING }}/$PKG_SUBMOD_NAME"
103+
PKG_SUBMOD_PATH="${STAGING}/$PKG_SUBMOD_NAME"
98104
99-
zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "${{ env.BIN }}*" -x "${{ steps.vars.outputs.PKG_STAGING }}*"
105+
zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "${{ env.BIN_DIR }}*" -x "${STAGING}*"
100106
101-
echo ::set-output name=PKG_SUBMOD_NAME::${PKG_SUBMOD_NAME}
102107
echo ::set-output name=PKG_SUBMOD_PATH::${PKG_SUBMOD_PATH}
103108
104109
- name: Publish release assets

.github/workflows/checkPR.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)