diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8e3125..3a611ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -30,3 +32,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} + SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 30f324c..145456f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -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 @@ -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 @@ -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