mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Disable publishing builds to download.vcmi.eu except develop. Added artifacts
This commit is contained in:
parent
6d8373a473
commit
92a9106e89
34
.github/workflows/github.yml
vendored
34
.github/workflows/github.yml
vendored
@ -1,9 +1,6 @@
|
|||||||
name: CMake
|
name: CMake
|
||||||
|
|
||||||
on:
|
on: [ push ]
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
branches: [ develop ]
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
@ -27,10 +24,14 @@ jobs:
|
|||||||
- platform: mac
|
- platform: mac
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
test: 0
|
test: 0
|
||||||
|
pack: 1
|
||||||
|
extension: dmg
|
||||||
- platform: mxe
|
- platform: mxe
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
mxe: i686-w64-mingw32.shared
|
mxe: i686-w64-mingw32.shared
|
||||||
test: 0
|
test: 0
|
||||||
|
pack: 1
|
||||||
|
extension: exe
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
@ -74,18 +75,17 @@ jobs:
|
|||||||
ninja
|
ninja
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
|
if: ${{ matrix.test == 1 }}
|
||||||
run: |
|
run: |
|
||||||
cd ${{github.workspace}}/build
|
cd ${{github.workspace}}/build
|
||||||
ctest -C Release -V
|
ctest -C Release -V
|
||||||
if: ${{ matrix.test == 1 }}
|
|
||||||
|
|
||||||
- name: Upload build
|
- name: Pack
|
||||||
id: cpack
|
id: cpack
|
||||||
|
if: ${{ matrix.pack == 1 }}
|
||||||
run: |
|
run: |
|
||||||
cd ${{github.workspace}}/build
|
cd ${{github.workspace}}/build
|
||||||
source ${{github.workspace}}/CI/${{matrix.platform}}/upload_package.sh
|
cpack
|
||||||
env:
|
|
||||||
DEPLOY_RSA: ${{ secrets.DEPLOY_RSA }}
|
|
||||||
|
|
||||||
- name: Additional logs
|
- name: Additional logs
|
||||||
if: ${{ failure() && steps.cpack.outcome == 'failure' && matrix.platform == 'mxe' }}
|
if: ${{ failure() && steps.cpack.outcome == 'failure' && matrix.platform == 'mxe' }}
|
||||||
@ -93,6 +93,22 @@ jobs:
|
|||||||
cat ${{github.workspace}}/build/_CPack_Packages/win32/NSIS/project.nsi
|
cat ${{github.workspace}}/build/_CPack_Packages/win32/NSIS/project.nsi
|
||||||
cat ${{github.workspace}}/build/_CPack_Packages/win32/NSIS/NSISOutput.log
|
cat ${{github.workspace}}/build/_CPack_Packages/win32/NSIS/NSISOutput.log
|
||||||
|
|
||||||
|
- name: Artifacts
|
||||||
|
if: ${{ matrix.pack == 1 }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.VCMI_PACKAGE_FILE_NAME }} - ${{ matrix.platform }}
|
||||||
|
path: ${{github.workspace}}/build/${{ env.VCMI_PACKAGE_FILE_NAME }}.${{ matrix.extension }}
|
||||||
|
|
||||||
|
- name: Upload build
|
||||||
|
if: ${{ matrix.pack == 1 && github.ref == 'refs/heads/develop' }}
|
||||||
|
run: |
|
||||||
|
cd ${{github.workspace}}/build
|
||||||
|
source ${{github.workspace}}/CI/${{matrix.platform}}/upload_package.sh
|
||||||
|
env:
|
||||||
|
DEPLOY_RSA: ${{ secrets.DEPLOY_RSA }}
|
||||||
|
PACKAGE_EXTENSION: ${{ matrix.extension }}
|
||||||
|
|
||||||
- uses: act10ns/slack@v1
|
- uses: act10ns/slack@v1
|
||||||
with:
|
with:
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
if [ -z "$DEPLOY_RSA" ];
|
|
||||||
then
|
|
||||||
# Due to security measures travis not expose encryption keys for PR from forks
|
|
||||||
echo "Build generation is skipped for forks"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
cpack
|
|
||||||
|
|
||||||
echo "$DEPLOY_RSA" > /tmp/deploy_rsa
|
|
||||||
chmod 600 /tmp/deploy_rsa
|
|
||||||
|
|
||||||
eval "$(ssh-agent -s)"
|
|
||||||
ssh-add /tmp/deploy_rsa
|
|
||||||
|
|
||||||
sftp -r -o StrictHostKeyChecking=no travis@beholder.vcmi.eu <<< "put $VCMI_PACKAGE_FILE_NAME.exe /incoming/$VCMI_PACKAGE_FILE_NAME.exe"
|
|
@ -6,12 +6,10 @@ then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cpack
|
|
||||||
|
|
||||||
echo "$DEPLOY_RSA" > /tmp/deploy_rsa
|
echo "$DEPLOY_RSA" > /tmp/deploy_rsa
|
||||||
chmod 600 /tmp/deploy_rsa
|
chmod 600 /tmp/deploy_rsa
|
||||||
|
|
||||||
eval "$(ssh-agent -s)"
|
eval "$(ssh-agent -s)"
|
||||||
ssh-add /tmp/deploy_rsa
|
ssh-add /tmp/deploy_rsa
|
||||||
|
|
||||||
sftp -r -o StrictHostKeyChecking=no travis@beholder.vcmi.eu <<< "put $VCMI_PACKAGE_FILE_NAME.dmg /incoming/$VCMI_PACKAGE_FILE_NAME.dmg"
|
sftp -r -o StrictHostKeyChecking=no travis@beholder.vcmi.eu <<< "put $VCMI_PACKAGE_FILE_NAME.$PACKAGE_EXTENSION /incoming/$VCMI_PACKAGE_FILE_NAME.$PACKAGE_EXTENSION"
|
Loading…
Reference in New Issue
Block a user