Browse Source

fix: use env variable instead of `login` option (#1128)

Baptiste Augrain 3 years ago
parent
commit
c4583ad3f0
2 changed files with 3 additions and 4 deletions
  1. 3 2
      .github/workflows/linux.yml
  2. 0 2
      stores/snapcraft/check_version.sh

+ 3 - 2
.github/workflows/linux.yml

@@ -116,7 +116,7 @@ jobs:
         run: ./stores/snapcraft/check_version.sh
         run: ./stores/snapcraft/check_version.sh
         env:
         env:
           ARCHITECTURE: ${{ matrix.platform }}
           ARCHITECTURE: ${{ matrix.platform }}
-          SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }}
+          SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
 
 
       # - uses: docker/setup-qemu-action@v1
       # - uses: docker/setup-qemu-action@v1
       #   if: env.SHOULD_DEPLOY == 'yes'
       #   if: env.SHOULD_DEPLOY == 'yes'
@@ -142,7 +142,8 @@ jobs:
 
 
       - uses: snapcore/action-publish@v1
       - uses: snapcore/action-publish@v1
         with:
         with:
-          store_login: ${{ secrets.SNAP_STORE_LOGIN }}
           snap: ${{ steps.build.outputs.snap }}
           snap: ${{ steps.build.outputs.snap }}
           release: stable
           release: stable
+        env:
+          SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
         if: env.SHOULD_DEPLOY == 'yes'
         if: env.SHOULD_DEPLOY == 'yes'

+ 0 - 2
stores/snapcraft/check_version.sh

@@ -15,8 +15,6 @@ else
 
 
   sudo snap install --channel stable --classic snapcraft
   sudo snap install --channel stable --classic snapcraft
 
 
-  echo "${SNAP_STORE_LOGIN}" | snapcraft login --with -
-
   echo "Architecture: ${ARCHITECTURE}"
   echo "Architecture: ${ARCHITECTURE}"
 
 
   SNAP_VERSION=$(snapcraft list-revisions codium | grep -F "stable*" | grep "${ARCHITECTURE}" | tr -s ' ' | cut -d ' ' -f 4)
   SNAP_VERSION=$(snapcraft list-revisions codium | grep -F "stable*" | grep "${ARCHITECTURE}" | tr -s ' ' | cut -d ' ' -f 4)