Skip to content

Commit

Permalink
release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aakash-rajur committed Oct 8, 2023
1 parent 43952fb commit eb9b07c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
tags:
- v*

permissions:
contents: write

jobs:
test:
name: Test
uses: ./.github/workflows/test-job.yml
with:
ref: ${{ github.ref_name }}
release:
name: Release
runs-on: ubuntu-latest
needs:
- test
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- name: setup go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: install dependencies
run: go mod download
- name: release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ brews:
- name: sqlxgen
homepage: https://github.com/aakash-rajur/sqlxgen
description: tool to generate sqlx models from schemas and queries
license: MIT
test: |
system "#{bin}/sqlxgen version"

0 comments on commit eb9b07c

Please sign in to comment.