GitHub Actions: push to transfer.sh for PRs, post release for pushes

This means that PRs from people using the main repo for their staging
branches will get both transfer.sh and a release.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2019-10-25 16:53:48 -04:00
parent a07c2feb95
commit f83505b554
4 changed files with 30 additions and 0 deletions

View file

@ -23,6 +23,7 @@ jobs:
cp /__w/subsurface/subsurface-mobile-build-arm//build/outputs/apk/debug/subsurface-mobile-build-arm-debug.apk ${GITHUB_WORKSPACE}/Subsurface-mobile.apk cp /__w/subsurface/subsurface-mobile-build-arm//build/outputs/apk/debug/subsurface-mobile-build-arm-debug.apk ${GITHUB_WORKSPACE}/Subsurface-mobile.apk
- name: create CI release - name: create CI release
if: github.event_name == 'pull_request'
uses: ./.github/actions/release uses: ./.github/actions/release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -32,3 +33,9 @@ jobs:
BIN1: ./Subsurface-mobile.apk BIN1: ./Subsurface-mobile.apk
BIN2: ./Subsurface-mobile.arm64.apk BIN2: ./Subsurface-mobile.arm64.apk
- name: copy to transfer.sh
if: github.event_name == 'push'
run: |
apt-get install -y curl
curl --upload-file Subsurface-mobile.apk "https://transfer.sh/Subsurface-mobile.apk
curl --upload-file Subsurface-mobile.arm64.apk "https://transfer.sh/Subsurface-mobile.arm64.apk

View file

@ -17,6 +17,7 @@ jobs:
bash -x subsurface/.github/workflows/scripts/linux-in-container-build.sh bash -x subsurface/.github/workflows/scripts/linux-in-container-build.sh
- name: create CI release - name: create CI release
if: github.event_name == 'pull_request'
uses: ./.github/actions/release uses: ./.github/actions/release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -24,3 +25,9 @@ jobs:
REF: ${{ github.ref }} REF: ${{ github.ref }}
COMMIT: ${{ github.sha }} COMMIT: ${{ github.sha }}
BIN1: ./Subsurface.AppImage BIN1: ./Subsurface.AppImage
- name: copy to transfer.sh
if: github.event_name == 'push'
run: |
apt-get install -y curl
curl --upload-file Subsurface.AppImage "https://transfer.sh/Subsurface.AppImage

View file

@ -96,6 +96,7 @@ jobs:
with: with:
name: Subsurface.app.zip name: Subsurface.app.zip
- name: create CI release - name: create CI release
if: github.event_name == 'pull_request'
uses: ./.github/actions/release uses: ./.github/actions/release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -103,3 +104,8 @@ jobs:
REF: ${{ github.ref }} REF: ${{ github.ref }}
COMMIT: ${{ github.sha }} COMMIT: ${{ github.sha }}
BIN1: Subsurface.app.zip BIN1: Subsurface.app.zip
- name: copy to transfer.sh
if: github.event_name == 'push'
run: |
curl --upload-file Subsurface.app.zip "https://transfer.sh/Subsurface.app.zip"

View file

@ -34,6 +34,7 @@ jobs:
grep "Built target installer" build.log grep "Built target installer" build.log
- name: create CI release - name: create CI release
if: github.event_name == 'pull_request'
uses: ./.github/actions/release uses: ./.github/actions/release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -46,3 +47,12 @@ jobs:
BIN4: ./smtk2ssrf-installer.exe BIN4: ./smtk2ssrf-installer.exe
BIN5: ./smtk2ssrf.exe BIN5: ./smtk2ssrf.exe
- name: copy to transfer.sh
if: github.event_name == 'push'
run: |
apt-get install -y curl
curl --upload-file subsurface-installer.exe "https://transfer.sh/subsurface-installer.exe
curl --upload-file subsurface.exe "https://transfer.sh/subsurface.exe
curl --upload-file subsurface.exe.debug "https://transfer.sh/subsurface.exe.debug
curl --upload-file smtk2ssrf-installer.exe "https://transfer.sh/smtk2ssrf-installer.exe
curl --upload-file smtk2ssrf.exe "https://transfer.sh/smtk2ssrf.exe