Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
8338a661f7
|
|||
|
db0bda6bae
|
|||
|
80ee3703f4
|
@@ -2,6 +2,8 @@
|
||||
name: Buf CI
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -10,24 +12,13 @@ jobs:
|
||||
buf:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- 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
|
||||
echo ${{ gitea.api_url }}
|
||||
|
||||
- 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: npm install --save-dev @bufbuild/protoc-gen-es
|
||||
- run: buf --version
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -35,12 +26,12 @@ jobs:
|
||||
path: ./
|
||||
- run: npx buf generate
|
||||
- run: |
|
||||
if [ -z ${{ gitea.ref }} ]; then
|
||||
if [ -n ${{ gitea.ref_name }} ]; then
|
||||
mkdir .res
|
||||
for out in go ts docs; do
|
||||
tar czf .res/${out}.tar.gz ./stub/${out}/ .
|
||||
curl --user gitea:${{ gitea.token }} \
|
||||
--upload-file .res/${out}.tar.gz \
|
||||
${{ gitea.api_url }}/packages/kahroba/generic/proto/${{ gitea.ref }}/${out}.tar.gz
|
||||
${{ gitea.api_url }}/packages/kahroba/generic/proto/${{ gitea.ref_name }}/${out}.tar.gz
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@bufbuild/buf": "^1.47.2",
|
||||
"@bufbuild/protobuf": "^2.2.2",
|
||||
"@bufbuild/protoc-gen-es": "^2.2.2"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user