Skip to content

Commit

Permalink
Try to add snapcraft
Browse files Browse the repository at this point in the history
  • Loading branch information
vHanda committed May 18, 2022
1 parent 641c7dc commit a3163c8
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@ name: goreleaser
on:
push:
tags:
- '*'
- "*"

jobs:
goreleaser:
runs-on: macos-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
-
name: Run GoReleaser
- name: snapcraft-login
env:
SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
run: |
snapcraft login --with <(echo "$SNAPCRAFT_LOGIN" | base64 -d)
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
Expand All @@ -30,3 +32,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
43 changes: 43 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ builds:
- arm
- arm64

- binary: git-auto-sync-daemon
id: git-auto-sync-daemon
dir: daemon
env:
- CGO_ENABLED=0
goos:
- linux
- windows
goarch:
- amd64
- arm
- arm64

# Macos build needs to be built on macos
# https://github.com/rjeczalik/notify/issues/177
- binary: git-auto-sync
Expand All @@ -30,6 +43,19 @@ builds:
goarch:
- amd64
- arm64

- binary: git-auto-sync-daemon
id: git-auto-sync-daemon-macos
dir: daemon
env:
- CGO_ENABLED=1
- CC=clang
- CXX=clang++
goos:
- darwin
goarch:
- amd64
- arm64
archives:
- replacements:
darwin: Darwin
Expand Down Expand Up @@ -63,3 +89,20 @@ brews:
bin.install "git-auto-sync"
bash_completion.install "completions/bash_autocomplete"
zsh_completion.install "completions/zsh_autocomplete"
snapcrafts:
publish: true
summary: Automatically sync your changes in any git repository
description: |
GitAutoSync is a simple command line program to automatically commit changes
to your git repo, and always keep that repo up to date. This way you can use
any editor with your text files, and never need to worry about committing
and remembering to push and pull changes.
confinement: classic
license: Apache-2.0
base: core20
grade: devel
apps:
git-auto-sync:
command: git-auto-sync
completer: completions/bash_completion

0 comments on commit a3163c8

Please sign in to comment.