Skip to content

Commit 0d6a161

Browse files
committed
update: add auto release workflow
1 parent 9b36523 commit 0d6a161

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/release.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
on:
3+
push:
4+
# pull_request:
5+
# branches:
6+
# - '**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
# test:
11+
# runs-on: ubuntu-22.04
12+
# strategy:
13+
# matrix:
14+
# go: ['1.17', '1.18', '1.19']
15+
# name: Go ${{ matrix.go }} test
16+
# steps:
17+
# - uses: actions/checkout@v3
18+
# - name: Setup go
19+
# uses: actions/setup-go@v3
20+
# with:
21+
# go-version: ${{ matrix.go }}
22+
# - run: go test -race -v -coverprofile=profile.cov ./pkg/...
23+
# - uses: codecov/codecov-action@v3.1.1
24+
# with:
25+
# file: ./profile.cov
26+
# name: codecov-go
27+
release:
28+
runs-on: ubuntu-22.04
29+
# needs: [test]
30+
# if: ${{ github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main' }}
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
steps:
34+
- name: Source checkout
35+
uses: actions/checkout@v3
36+
- name: Semantic Release
37+
uses: cycjimmy/semantic-release-action@v3
38+
with:
39+
dry_run: false
40+
semantic_version: 18.0.1
41+
extra_plugins: |
42+
@semantic-release/exec@6.0.3

.releaserc.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
branches: ["main", {name: 'dev', prerelease: true}],
3+
plugins: [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/github"
7+
]
8+
};

0 commit comments

Comments
 (0)