don't publish the snap if it's a pull request (#795) #265
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
types: [ "review_requested", "ready_for_review" ] | |
workflow_dispatch: | |
name: Snap | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
snap: | |
name: "GNOME on Snap" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [x86_64] | |
fail-fast: false | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Build Snap | |
uses: snapcore/action-build@v1 | |
id: snapcraft-build | |
with: | |
snapcraft-args: "-v" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: denaro-amd64-snap | |
path: ${{ steps.snapcraft-build.outputs.snap }} | |
- name: Upload and release Denaro Snap | |
uses: snapcore/action-publish@v1 | |
if: ${{ github.event_name != 'pull_request' }} | |
env: | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} | |
with: | |
snap: ${{ steps.snapcraft-build.outputs.snap }} | |
release: ${{'edge'}} |