Skip to content

Commit

Permalink
ci: publish release and snap
Browse files Browse the repository at this point in the history
  • Loading branch information
yktoo committed Nov 24, 2021
1 parent fa9aa33 commit 8dcba56
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ on:
push:
branches:
- dev
- master
pull_request:
branches:
- dev
tags:
- v*

jobs:

Expand Down Expand Up @@ -65,12 +63,13 @@ jobs:
version: latest
args: check

- name: Build and deploy (dry run)
- name: Make a release (tag only)
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --snapshot
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -94,3 +93,11 @@ jobs:
store_login: ${{ secrets.snapcraft_token }}
snap: ${{ steps.snap.outputs.snap }}
release: edge

- name: Publish snap to stable channel (tag only)
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.snapcraft_token }}
snap: ${{ steps.snap.outputs.snap }}
release: stable

0 comments on commit 8dcba56

Please sign in to comment.