Use snap actions instead of the broken container

The container didn't work properly for our base snap anyway.
This commit is contained in:
Pierre Ossman 2020-12-30 14:18:29 +01:00
parent cd9f535eb3
commit 4a8efa6bc9
1 changed files with 13 additions and 11 deletions

View File

@ -30,25 +30,27 @@ jobs:
if: ${{ github.event_name == 'release' && github.event.release.prerelease }} if: ${{ github.event_name == 'release' && github.event.release.prerelease }}
snap: snap:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: snapcore/snapcraft
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: | - run: |
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4) VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)
echo $VERSION echo $VERSION
sed -i "s/@VERSION@/$VERSION/g" snap/snapcraft.yaml sed -i "s/@VERSION@/$VERSION/g" snap/snapcraft.yaml
- run: snapcraft - uses: snapcore/action-build@v1
id: snapcraft
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: snap name: snap
path: novnc*.snap path: ${{ steps.snapcraft.outputs.snap }}
- run: | - uses: snapcore/action-publish@v1
mkdir .snapcraft with:
echo ${SNAPCRAFT_LOGIN} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg store_login: ${{ secrets.SNAPCRAFT_LOGIN }}
env: snap: ${{ steps.build.outputs.snap }}
SNAPCRAFT_LOGIN: ${{secrets.SNAPCRAFT_LOGIN}} release: stable
if: ${{ github.event_name == 'release' }}
- run: snapcraft push --release=stable *.snap
if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} if: ${{ github.event_name == 'release' && !github.event.release.prerelease }}
- run: snapcraft push --release=beta *.snap - uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.SNAPCRAFT_LOGIN }}
snap: ${{ steps.build.outputs.snap }}
release: beta
if: ${{ github.event_name == 'release' && github.event.release.prerelease }} if: ${{ github.event_name == 'release' && github.event.release.prerelease }}