feat: add go release

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

feat: add go release

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

feat: add go release

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
pull/657/head
Xinwei Xiong(cubxxw-openim) 2 years ago
parent 21a3c5b076
commit 4af8f274ff
No known key found for this signature in database
GPG Key ID: 1BAD6F395338EFDE

@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
name: "Code Scanning - Action" name: "OpenIM Code Scanning - Action"
on: on:
push: push:
@ -42,8 +42,8 @@ jobs:
security-events: write security-events: write
# only required for workflows in private repositories # only required for workflows in private repositories
actions: read actions: write
contents: read contents: write
steps: steps:
- name: Checkout repository - name: Checkout repository
@ -53,8 +53,8 @@ jobs:
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages # Override language selection by uncommenting this and choosing your languages
# with: with:
# languages: go, javascript, csharp, python, cpp, java, ruby languages: go
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below). # If this step fails, then you should remove it and run the build manually (see below).
@ -68,7 +68,7 @@ jobs:
# three lines and modify them (or add more) to build your code if your # three lines and modify them (or add more) to build your code if your
# project uses a compiled language # project uses a compiled language
#- run: | # - run: |
# make bootstrap # make bootstrap
# make release # make release

@ -37,16 +37,63 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
- name: Setup Go
uses: actions/setup-go@v2
- name: Run go modules tidy
run: |
sudo make tidy
sudo make tools.verify.go-gitlint
echo "Run go modules tidy successfully"
- name: Run go format
run: |
sudo make format
echo "Run go format successfully"
continue-on-error: true
- name: Generate all necessary files, such as error code files
run: |
make generate
echo "Generate all necessary files successfully"
continue-on-error: true
- name: Run unit test and get test coverage
run: |
make cover
echo "Run unit test and get test coverage successfully"
continue-on-error: true
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go
- name: Build source code for host platform
run: |
sudo make build
echo "Build source code for host platform successfully"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: OpenIM verify copyright
run: |
sudo make verify-copyright
sudo make add-copyright
echo "OpenIM verify successfully"
continue-on-error: true
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v5 uses: peter-evans/create-pull-request@v5.0.0
with: with:
token: ${{ secrets.REDBOT_GITHUB_TOKEN }} commit-message: Bump League Patch to ${{ steps.patch.outputs.patch }}
commit-message: 'build: update distribution' title: Bump League Patch to ${{ steps.patch.outputs.patch }}
title: 'build: update distribution'
body: | body: |
- Updates the distribution for changes on `main` Review criteria:
Auto-generated by [create-pull-request][1] - [ ] Disenchanter can connect and issue actions
[1]: https://github.com/OpenIMSDK/Open-IM-Sever This is an automated PR.
branch: 'bot/update-distribution' <sub>[workflow](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/.github/workflows/pull-request.yml).</sub>
branch: cicd/patch-${{ steps.patch.outputs.patch }}
labels: kind/documentation, area/test, ok-to-test
Loading…
Cancel
Save