diff options
author | numToStr <vikasraj1911@gmail.com> | 2021-12-10 14:56:42 +0530 |
---|---|---|
committer | numToStr <vikasraj1911@gmail.com> | 2021-12-14 18:57:58 +0530 |
commit | 5ca649a1d87a7a557e7bf44fad73309ba43d8376 (patch) | |
tree | 4562c50d16ba0783f460d88e529815efd7a39bb8 /.github | |
parent | 2eba02747382719059f6c6a4c96d95a154580276 (diff) | |
download | lua-language-server-5ca649a1d87a7a557e7bf44fad73309ba43d8376.zip |
feat: merge `checkPR` workflow
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 35 | ||||
-rw-r--r-- | .github/workflows/checkPR.yml | 16 |
2 files changed, 20 insertions, 31 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 284745cf..875cca16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,18 @@ name: build -on: push +on: + push: + branches: + - master + tags: + - "*" + pull_request: + branches: + - master env: PROJECT: lua-language-server - BIN: bin + BIN_DIR: bin jobs: compile: @@ -61,7 +69,7 @@ jobs: - uses: actions/upload-artifact@v2 with: name: ${{ steps.vars.outputs.PKG_BASENAME }} - path: ${{ env.BIN }} + path: ${{ env.BIN_DIR }} - name: Package tarballs if: startsWith(github.ref, 'refs/tags/') @@ -74,18 +82,15 @@ jobs: mkdir -p ${STAGING} # Copying binary and runtime files to staging area - cp -r main.lua debugger.lua locale meta script ${{ env.BIN }} ${STAGING} + cp -r main.lua debugger.lua locale meta script ${{ env.BIN_DIR }} ${STAGING} # Creating release assets pushd "${STAGING}/" >/dev/null - case "${{ matrix.job.target }}" in - windows) - 7z -y a ${NAME} * | tail -2 - ;; - *) - tar czf ${NAME} * - ;; - esac; + if [[ "${{ matrix.job.target }}" = windows ]]; then + 7z -y a ${NAME} * | tail -2 + else + tar czf ${NAME} * + fi popd >/dev/null # Packaging submodules for homebrew distribution @@ -93,12 +98,12 @@ jobs: id: submodules if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.job.target == 'macos' }} run: | + STAGING=${{ steps.vars.outputs.PKG_STAGING }} PKG_SUBMOD_NAME="${{ env.PROJECT }}-${{ steps.vars.outputs.PKG_VERSION }}-submodules.zip" - PKG_SUBMOD_PATH="${{ steps.vars.outputs.PKG_STAGING }}/$PKG_SUBMOD_NAME" + PKG_SUBMOD_PATH="${STAGING}/$PKG_SUBMOD_NAME" - zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "${{ env.BIN }}*" -x "${{ steps.vars.outputs.PKG_STAGING }}*" + zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "${{ env.BIN_DIR }}*" -x "${STAGING}*" - echo ::set-output name=PKG_SUBMOD_NAME::${PKG_SUBMOD_NAME} echo ::set-output name=PKG_SUBMOD_PATH::${PKG_SUBMOD_PATH} - name: Publish release assets diff --git a/.github/workflows/checkPR.yml b/.github/workflows/checkPR.yml deleted file mode 100644 index c83bf3ab..00000000 --- a/.github/workflows/checkPR.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: checkPR -on: pull_request -jobs: - compile: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [windows-latest, ubuntu-18.04, macos-latest] - steps: - - uses: actions/checkout@v1 - with: - ref: ${{ github.event.pull_request.head.sha }} - submodules : recursive - - uses: actboy168/setup-luamake@master - - run: luamake |