Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/snapcraft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ on:
push:
tags:
- 'v*.*.*'
pull_request:
paths:
- 'snap/**'
- '.github/workflows/snapcraft.yml'
workflow_dispatch:

jobs:
build-and-release:
runs-on: ubuntu-latest
env:
SNAP_VERSION: ${{ github.ref_name }}
# Use the tag as the snap version on tag pushes; otherwise use a dev
# placeholder so non-tag triggers (PRs, manual runs) still produce a
# valid version string.
SNAP_VERSION: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || '0.0.0-dev' }}
steps:
- uses: actions/checkout@v6

Expand All @@ -20,7 +28,10 @@ jobs:
run: snapcraft

- name: Upload to Snap Store
if: success()
# Only publish on tag pushes. PRs and manual dispatch builds stop
# at the build step so we can iterate on snap/snapcraft.yaml
# without touching the store.
if: startsWith(github.ref, 'refs/tags/v')
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
run: snapcraft upload *.snap --release=edge
1 change: 1 addition & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: git-sweep
base: core22
adopt-info: git-sweep
summary: Remove local branches whose remote has been deleted (gone)
description: |
git-sweep is a small, cross-platform CLI that removes local branches whose upstream has been removed.
Expand Down
Loading