Skip to content

Commit

Permalink
auto workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cuotos committed Dec 30, 2022
1 parent 17b19cd commit 794f885
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

name: pull_request

on: pull_request

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup Go
uses: actions/setup-go@v3
with:
go-version: ">= 1.19.0"
- name: test
run: go test -v ./...
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: release

on:
push:
tags:
- "*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: setup Go
uses: actions/setup-go@v3
with:
go-version: ">=1.19.0"
- name: test
run: go test -v ./...
- name: goreleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
homebrew:
runs-on: ubuntu-latest
needs: release
steps:
- name: assert version
id: version
uses: nowsprinting/check-version-format-action@v3
with:
prefix: 'v'
- name: update homebrew tap
uses: mislav/bump-homebrew-formula-action@v2
with:
homebrew-tap: cuotos/homebrew-tap
download-url: https://github.com/cuotos/outstanding-prs/releases/download/${{ steps.version.outputs.full }}/outstanding-prs_${{ steps.version.outputs.full_without_prefix }}_Darwin_x86_64.tar.gz
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 794f885

Please sign in to comment.