Closed jimafisk closed 1 year ago
Re-exported snapcraft credentials locally per https://github.com/plentico/plenti/issues/192#issuecomment-1143002099:
snapcraft export-login --snaps plenti -
Then on GitHub, went to: settings > security > secrets and variables > actions > repository secrets
and updated SNAPCRAFT_TOKEN
Then I tried to re-run the existing job and the "snapcraft login" step throws:
Starting Snapcraft 7.3.2
Logging execution to '/home/runner/.local/state/snapcraft/log/snapcraft-20230603-16052[8](https://github.com/plentico/plenti/actions/runs/5164383127/jobs/9303473048#step:6:9).113237.log'
--with is no longer supported, export the auth to the environment variable 'SNAPCRAFT_STORE_CREDENTIALS' instead
Cannot parse config: File contains no section headers.
file: '<string>', line: 1
'***\n'
Full execution log: '/home/runner/.local/state/snapcraft/log/snapcraft-20230603-160528.[11](https://github.com/plentico/plenti/actions/runs/5164383127/jobs/9303473048#step:6:12)3237.log'
Error: Process completed with exit code 1.
Looks like we're using syntax only support by snapcraft 6.x
so we should upgrade to newer syntax supported by 7.x
:
New failure (Ensure the keyring is working or SNAPCRAFT_STORE_CREDENTIALS is correctly exported into the environment
):
⨯ release failed after 3m2s error=snapcraft packages: failed to publish artifacts: failed to push dist/plenti_0.6.15_linux_amd64.snap package: exit status 1: Starting Snapcraft 7.3.2
Logging execution to '/home/runner/.local/state/snapcraft/log/snapcraft-20230603-163444.111833.log'
craft-store error: No keyring found to store or retrieve credentials from.
Recommended resolution: Ensure the keyring is working or SNAPCRAFT_STORE_CREDENTIALS is correctly exported into the environment
For more information, check out: https://snapcraft.io/docs/snapcraft-authentication
Full execution log: '/home/runner/.local/state/snapcraft/log/snapcraft-20230603-163444.111833.log'
Error: The process '/opt/hostedtoolcache/goreleaser-action/1.18.2/x64/goreleaser' failed with exit code 1
The fix was just to set SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.snapcraft_token }}
directly in the step where we're calling Goreleaser and eliminating the "Snapcraft Login" step we were using previously.
Latest build failed: https://github.com/plentico/plenti/actions/runs/5164383127/jobs/9303243067