Update ci, only run ubuntu-latest / windows-latest, but lock them to … (#26)
* Update ci, only run ubuntu-latest / windows-latest, but lock them to specific versions, and only upload when we're on master
This commit is contained in:
parent
1a9472480c
commit
6b361db6de
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -2,30 +2,24 @@ name: Extension builder
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ action, master ]
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ action, master ]
|
||||
branches: [ master ]
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, windows-2019, ubuntu-latest, windows-latest]
|
||||
os: [ubuntu-22.04, windows-2022]
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
cc: clang-10
|
||||
cxx: clang++-10
|
||||
- os: windows-2019
|
||||
cc: msvc
|
||||
- os: ubuntu-latest
|
||||
- os: ubuntu-22.04
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
- os: windows-latest
|
||||
- os: windows-2022
|
||||
cc: msvc
|
||||
fail-fast: false
|
||||
|
||||
|
||||
name: ${{ matrix.os }} - ${{ matrix.cc }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@ -155,7 +149,7 @@ jobs:
|
||||
cp "${{ env.ZIP_FILENAME }}" "${{ matrix.os }}_${{ matrix.cc }}_${{ env.ZIP_FILENAME }}"
|
||||
|
||||
- name: Upload release
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/action' && (startsWith(matrix.os, 'ubuntu-latest') || startsWith(matrix.os, 'windows-latest'))
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
shell: bash
|
||||
working-directory: extension/build/package
|
||||
run: |
|
||||
@ -163,7 +157,7 @@ jobs:
|
||||
AUTHORIZATION="$(echo -n '${{ secrets.USERNAME }}:${{ secrets.PASSWORD }}' | base64)"
|
||||
echo "::add-mask::${AUTHORIZATION}"
|
||||
|
||||
HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.ZIP_FILENAME }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&branch=action&filename=${{ env.ZIP_FILENAME }}")
|
||||
HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.ZIP_FILENAME }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&filename=${{ env.ZIP_FILENAME }}")
|
||||
if test ${HTTP_CODE} -ne 200; then
|
||||
exit ${HTTP_CODE}
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user