From 07e3e7904e5912a9b8db40fdc16a18179b4e240b Mon Sep 17 00:00:00 2001 From: dP Date: Sun, 17 Oct 2021 02:15:16 +0300 Subject: [PATCH] Upload files to GitHub release and CityMania website automatically --- .github/workflows/release.yml | 73 ++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cfb0223dd0..3c8919e2bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} \ No newline at end of file