Skip to content

Commit

Permalink
feat(action): update
Browse files Browse the repository at this point in the history
update

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed May 8, 2023
1 parent 939eabc commit 9e807a2
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 75 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/changelog.yml

This file was deleted.

16 changes: 13 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ env:
GO_VERSION: '1.20'
TZ: Asia/Shanghai

permissions:
contents: read
permissions: write-all

on:
push:
Expand All @@ -15,7 +14,7 @@ on:
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/go.yml'
- '.github/workflows/*.yml'
pull_request:
branches:
- "*"
Expand Down Expand Up @@ -110,3 +109,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v4
- name: Run Coverage
run: make coverage
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
16 changes: 0 additions & 16 deletions .github/workflows/codecov.yml

This file was deleted.

55 changes: 53 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ env:
TZ: Asia/Shanghai
GO_VERSION: '1.20'

permissions:
contents: write
permissions: write-all

jobs:
release:
Expand All @@ -23,6 +22,14 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: install task
run: |
echo "install task"
go install github.com/go-task/task/v3/cmd/task@latest
- name: install upx
uses: crazy-max/ghaction-upx@v2
with:
install-only: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
Expand Down Expand Up @@ -52,3 +59,47 @@ jobs:
curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/
curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/
done
Changelog:
name: "Changelog"
needs: release
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: master
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: install task
run: |
echo "install task"
go install github.com/go-task/task/v3/cmd/task@latest
- name: Build docs
run: |
task godoc
- name: Publish docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./docs
- run: git fetch --prune --prune-tags
- run: git tag -l 'v*'
- run: ./hack/scripts/changelog.sh > CHANGELOG.md
- name: fetch current version
id: get-current-tag
uses: actions-ecosystem/[email protected]
- uses: peter-evans/create-pull-request@v5
with:
title: 'docs: updated CHANGELOG.md & docs for ${{steps.get-current-tag.outputs.tag }}'
commit-message: |
docs: updated CHANGELOG.md & docs
🤖 add release changelog using rebot.
branch: create-pull-request/changelog-${{steps.get-current-tag.outputs.tag }}
delete-branch: true
labels: |
kind/doc
kind/bot
9 changes: 4 additions & 5 deletions .github/workflows/go.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: go
name: build for test

env:
# Common versions
GO_VERSION: '1.20'
TZ: Asia/Shanghai

permissions:
contents: read
permissions: write-all

on:
push:
Expand Down Expand Up @@ -70,9 +69,9 @@ jobs:
- uses: actions/checkout@v3
- name: "Download Binary"
uses: actions/download-artifact@v3
with: { name: qcadmin_linux_amd64, path: dist/artifacts/ }
with: { name: qcadmin_linux_amd64, path: dist }
- name: test qcadmin
working-directory: dist/artifacts/
working-directory: dist
run: |
chmod +x qcadmin_linux_amd64
sudo ./qcadmin_linux_amd64 cluster init --debug
Expand Down

0 comments on commit 9e807a2

Please sign in to comment.