Compare commits
16 Commits
v1.0.1
...
v1.0.2fix14
| Author | SHA1 | Date | |
|---|---|---|---|
|
3c7092fb9b
|
|||
|
fcfe74d80b
|
|||
|
13a75d52de
|
|||
|
8aa875b1d6
|
|||
|
a199324bcc
|
|||
|
3ebd28b9b8
|
|||
|
f2ba3c5340
|
|||
|
86d857e242
|
|||
|
d79187dfb4
|
|||
|
2325afaaf0
|
|||
|
9c92ab9d34
|
|||
|
5bcb6feeac
|
|||
|
8338a661f7
|
|||
|
db0bda6bae
|
|||
|
80ee3703f4
|
|||
|
bec347d871
|
@@ -2,6 +2,8 @@
|
||||
name: Buf CI
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -10,39 +12,29 @@ jobs:
|
||||
buf:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '>=1.23.0'
|
||||
- uses: bufbuild/buf-setup-action@v1.47.2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ gitea.token }}
|
||||
path: ./
|
||||
- run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
- run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
- run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
|
||||
- run: npm install --save @bufbuild/protobuf @bufbuild/protoc-gen-es @bufbuild/buf
|
||||
- run: buf --version
|
||||
- run: |
|
||||
echo ${{ gitea.action }}
|
||||
echo ${{ gitea.event_name }}
|
||||
echo ${{ gitea.ref }}
|
||||
echo ${{ gitea.base_ref }}
|
||||
echo ${{ gitea.ref_name }}
|
||||
echo ${{ gitea.repository }}
|
||||
echo ${{ gitea.server_url }}
|
||||
echo ${{ gitea.token }}
|
||||
echo ${{ gitea.api_url }}
|
||||
echo ${{ gitea }}
|
||||
echo ${{ gitea.repo }}
|
||||
|
||||
# - uses: actions/setup-go@v5
|
||||
# with:
|
||||
# go-version: '>=1.18.0'
|
||||
# - uses: bufbuild/buf-setup-action@v1.47.2
|
||||
# - run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
# - run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
# - run: npm install --save-dev
|
||||
# - run: buf --version
|
||||
# - uses: actions/checkout@v4
|
||||
# with:
|
||||
# token: ${{ secrets.PROD_REG_TOKEN }}
|
||||
# path: ./
|
||||
# - run: npx buf generate
|
||||
# - run: |
|
||||
# mkdir .res
|
||||
# for out in go ts docs; do
|
||||
# tar czf .res/${out}.tar.gz ./stub/${out}/ .
|
||||
# curl --user nfel:${{ secrets.PROD_REG_TOKEN }} \
|
||||
# --upload-file .res/${out}.tar.gz \
|
||||
# https://git.kahrobatoken.com/api/packages/kahroba/generic/proto/${{ gitea.event }}/${out}.tar.gz
|
||||
# done
|
||||
#
|
||||
#
|
||||
export PATH=$PATH:./node_modules/.bin
|
||||
buf generate
|
||||
- run: |
|
||||
if [ -n ${{ gitea.ref_name }} ]; then
|
||||
mkdir .res
|
||||
for out in go ts doc; do
|
||||
tar czf .res/${out}.tar.gz ./stub/${out}/
|
||||
curl --user ${{ gitea.actor }}:${{ gitea.token }} \
|
||||
--upload-file .res/${out}.tar.gz \
|
||||
${{ gitea.api_url }}/packages/Kahroba/generic/proto/${{ gitea.ref_name }}/${out}.tar.gz
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -3,3 +3,4 @@ gen/go
|
||||
stub
|
||||
node_modules
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Protobuf with fangs
|
||||
|
||||

|
||||
|
||||
+6
-3
@@ -20,9 +20,12 @@ plugins:
|
||||
# - remote: buf.build/protocolbuffers/go:v1.30.0
|
||||
out: stub/go
|
||||
# NOTE: doc
|
||||
# - local: protoc-gen-doc
|
||||
# opt: html,index.html,source_relative
|
||||
# out: stub/doc
|
||||
- local: protoc-gen-doc
|
||||
opt: html,index.html,source_relative
|
||||
out: stub/doc/html
|
||||
- local: protoc-gen-doc
|
||||
opt: markdown,index.md,source_relative
|
||||
out: stub/doc/md
|
||||
# # NOTE: Gateway
|
||||
# # - remote: buf.build/grpc-ecosystem/gateway:v2.16.2
|
||||
# - local: protoc-gen-grpc-gateway
|
||||
|
||||
Reference in New Issue
Block a user