Skip to content

Commit

Permalink
feat: snapstore workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Arenukvern committed Mar 6, 2024
1 parent 1bd0a3e commit 4f609f2
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 13 deletions.
13 changes: 0 additions & 13 deletions .github/wip/release_snapstore.workflow.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/release_snapstore.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Snapstore Build
on:
release:
types: [created]
push:
branches:
- release/snapstore
workflow_dispatch:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
- name: Building snap
run: |
snapcraft
# Make sure the snap is installable
- name: Test snap installation
run: |
sudo snap install ./last-answer.snap –dangerous
- name: Save snap for reuse
uses: actions/upload-artifact@v4
with:
name: last-answer-snap
path: ./last-answer.snap

publish:
# if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: build
steps:
- name: Download snap
uses: actions/download-artifact@v3
with:
name: last-answer-snap
path: .
- name: Publish to Snapstore Edge
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}
with:
snap: ./last-answer.snap
release: edge

0 comments on commit 4f609f2

Please sign in to comment.