diff --git a/.github/release.yaml b/.github/release.yaml new file mode 100644 index 0000000..165ce26 --- /dev/null +++ b/.github/release.yaml @@ -0,0 +1,10 @@ +changelog: + categories: + - title: ➕ New + labels: ["new"] + - title: 🐛 Fixes + labels: ["fix", "bug"] + - title: 📝 Dependencies + labels: ["dependencies"] + - title: 📦 Other + labels: ["*"] \ No newline at end of file diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..6438151 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,31 @@ +name: Check + +on: + push: + branches: [ "**" ] + tags-ignore: [ "**" ] + + +jobs: + gotest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: '1.21' + + - name: Cache go packages + uses: actions/cache@v4 + with: + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}- + ${{ runner.os }}-go- + + - name: Run tests + run: go test -v ./... diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..b73307e --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,21 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + - "v*.*.*-*" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref }} + name: ${{ env.GITHUB_TAG }} + prerelease: ${{ contains(github.ref, '-') }} + generate_release_notes: true