diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 4006f0f8..5d9649e7 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -66,10 +66,15 @@ jobs: flavor: [development, production] steps: - - name: Set JELLYFIN_VERSION + - name: Set JELLYFIN_VERSION to git tag + if: ${{ startsWith(github.ref, 'refs/tags') }} run: echo "JELLYFIN_VERSION=$(echo ${GITHUB_REF#refs/tags/v} | tr / -)" >> $GITHUB_ENV - - name: Download Artifact + - name: Set JELLYFIN_VERSION to unstable + if: ${{ github.ref == 'refs/heads/master' }} + run: echo "JELLYFIN_VERSION=unstable" >> $GITHUB_ENV + + - name: Download artifact uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: name: jellyfin-chromecast-${{ matrix.flavor }} @@ -87,7 +92,7 @@ jobs: with: switches: -vrptz path: jellyfin-chromecast-${{ matrix.flavor }}.zip - remote_path: /srv/repository/releases/client/chromecast/versions/$({{ env.JELLYFIN_VERSION }}) + remote_path: /srv/repository/releases/client/chromecast/versions/${{ env.JELLYFIN_VERSION }} remote_host: ${{ secrets.DEPLOY_HOST }} remote_user: ${{ secrets.DEPLOY_USER }} remote_key: ${{ secrets.DEPLOY_KEY }} @@ -118,14 +123,14 @@ jobs: name: jellyfin-chromecast-production - name: Unzip artifact - run: unzip jellyfin-chromecast-production.zip -d jellyfin-chromecast + run: unzip jellyfin-chromecast-production.zip -d . - name: Deploy to apps1.jellyfin.org/chromecast/nightly uses: burnett01/rsync-deployments@45d84ad5f6c174f3e0ffc50e9060a9666d09c16e # 6.0.0 with: switches: -vrptz - path: jellyfin-chromecast - remote_path: /srv/chromecast/nightly + path: jellyfin-chromecast/ + remote_path: /srv/chromecast/nightly/ remote_host: ${{ secrets.DEPLOY_CC_HOST }} remote_user: ${{ secrets.DEPLOY_CC_USER }} remote_key: ${{ secrets.DEPLOY_CC_KEY }} @@ -135,8 +140,8 @@ jobs: uses: burnett01/rsync-deployments@45d84ad5f6c174f3e0ffc50e9060a9666d09c16e # 6.0.0 with: switches: -vrptz - path: jellyfin-chromecast - remote_path: /srv/chromecast/stable + path: jellyfin-chromecast/ + remote_path: /srv/chromecast/stable/ remote_host: ${{ secrets.DEPLOY_CC_HOST }} remote_user: ${{ secrets.DEPLOY_CC_USER }} remote_key: ${{ secrets.DEPLOY_CC_KEY }}