Skip to content

Try fromJSON hack

Try fromJSON hack #1

Workflow file for this run

# Build default branch and PRs, publish only from default.
# Needs `STORE_LOGIN` configured https://github.com/snapcore/action-publish#store-login
# Change channel from default `edge` if needed.
name: Build and pubish snap package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: build
uses: snapcore/action-build@v1
#with:
# path: path-to-snapcraft-project
- id: publish
if: github.ref == format('refs/heads/{0}', fromJSON('"main"'))
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ steps.build.outputs.snap }}
release: stable