Skip to content

Commit

Permalink
feat: release Go rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
soedirgo committed Jul 23, 2021
1 parent 3c5558f commit 9defab3
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
branches:
- new
workflow_dispatch:

jobs:
release:
name: semantic-release
runs-on: ubuntu-20.04
outputs:
new-release-published: ${{ steps.semantic-release.outputs.new_release_published }}
new-release-version: ${{ steps.semantic-release.outputs.new_release_version }}
steps:
- uses: actions/checkout@v2

- name: Run semantic-release
id: semantic-release
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

goreleaser:
name: GoReleaser
needs:
- release
if: needs.release.outputs.new-release-published == 'true'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: ~>0.173
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
29 changes: 29 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
project_name: supabase
before:
hooks:
- go mod tidy
builds:
- id: supabase
binary: supabase
ldflags:
- -X github.com/supabase/cli/cmd.version=v{{.Version}}
goos:
- darwin
- linux
- windows
changelog:
skip: true
brews:
- tap:
owner: supabase
name: homebrew-tap
description: Supabase CLI
homepage: https://supabase.io
license: MIT
scoop:
bucket:
owner: supabase
name: scoop-bucket
description: Supabase CLI
homepage: https://supabase.io
license: MIT
8 changes: 8 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"branches": ["new"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
}

0 comments on commit 9defab3

Please sign in to comment.