Skip to content

Commit

Permalink
chore(ci): add github action (#2)
Browse files Browse the repository at this point in the history
Signed-off-by: Black-Hole1 <[email protected]>
  • Loading branch information
BlackHole1 authored Jan 17, 2024
1 parent 778860a commit 37a2e3c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release
on:
push:
tags:
- "v*.*.*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.21.3

- name: Try Build
run: go build ./example/main.go

- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
generate_release_notes: true
draft: false
prerelease: false
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update pkg.go.dev
run: curl https://proxy.golang.org/github.com/${{ github.repository }}/v2/@v/${{ github.ref_name }}.info
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.21.3

- name: Try Build
run: go build ./example/main.go

0 comments on commit 37a2e3c

Please sign in to comment.