Upload files to GitHub release and CityMania website automatically

This commit is contained in:
dP
2021-10-17 02:15:16 +03:00
parent 48cbe6f11a
commit 07e3e7904e

View File

@@ -187,24 +187,6 @@ jobs:
path: source.tar.gz
retention-days: 1
- name: Release on GitHub
uses: softprops/action-gh-release@v0.1.13
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/bundles/citymania-client-${{ steps.metadata.outputs.version }}-source.zip
- name: Upload to CityMania
uses: appleboy/scp-action@master
if: startsWith(github.ref, 'refs/tags/')
with:
host: ${{ secrets.UPLOAD_HOST }}
username: ${{ secrets.UPLOAD_USERNAME }}
key: ${{ secrets.UPLOAD_KEY }}
port: ${{ secrets.UPLOAD_PORT }}
source: "build/bundles/citymania-client-${{ steps.metadata.outputs.version }}-source.zip"
strip_components: 2
target: ${{ secrets.UPLOAD_PATH }}
docs:
name: Docs
needs: source
@@ -1018,3 +1000,58 @@ jobs:
steamcmd +login ${{ secrets.STEAM_USERNAME }} ${{ secrets.STEAM_PASSWORD }} ${{ steps.steam-totp.outputs.code }} +run_app_build $(pwd)/release.vdf +quit
echo "::endgroup::"
)
cm-upload-github:
name: Release GitHub assets
needs:
- source
- linux
- macos
- windows
if: needs.source.outputs.trigger_type == 'new-master' || needs.source.outputs.trigger_type == 'new-tag'
runs-on: ubuntu-20.04
steps:
- name: Download all bundles
uses: actions/download-artifact@v2
- name: Release GitHub assets
uses: softprops/action-gh-release@v0.1.13
# if: startsWith(github.ref, 'refs/tags/')
with:
files: |
citymania-client-*/*.zip
citymania-client-*/*.xz
citymania-client-*/*.dmg
cm-upload-citymania:
name: Upload to CityMania
needs:
- source
- linux
- macos
- windows
# if: ${{ false }}
if: needs.source.outputs.trigger_type == 'new-master' || needs.source.outputs.trigger_type == 'new-tag'
runs-on: ubuntu-20.04
steps:
- name: Download all bundles
uses: actions/download-artifact@v2
- name: Upload to CityMania
uses: appleboy/scp-action@master
# if: startsWith(github.ref, 'refs/tags/')
with:
host: ${{ secrets.UPLOAD_HOST }}
username: ${{ secrets.UPLOAD_USERNAME }}
key: ${{ secrets.UPLOAD_KEY }}
port: ${{ secrets.UPLOAD_PORT }}
source: "citymania-client-*/*.zip,citymania-client-*/*.xz,citymania-client-*/*.dmg"
strip_components: 1
target: ${{ secrets.UPLOAD_PATH }}