Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webrpc update from head #11

Open
wants to merge 192 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
21e29fe
migrate from TSLint to ESLint (#82)
ottob Oct 22, 2020
c751ba9
typescript: change to protected instance vars for fetch
pkieltyka Nov 30, 2020
f617725
minor typo in the comment (#80)
nuharaf Nov 30, 2020
1a6df36
Update dep to chi v1.5.1
pkieltyka Jan 21, 2021
0f1ca67
bump version to v0.6.0
pkieltyka Jan 21, 2021
bd01519
README
pkieltyka Feb 18, 2021
cbdad88
README
pkieltyka Feb 18, 2021
301a0e2
README
pkieltyka Feb 18, 2021
f3a4274
Replace //go:generate statik with //go:embed (#89)
VojtechVitek May 8, 2021
454e61e
different install method for go v1.17 and later (#107)
robfordww Sep 29, 2022
4dd142d
Remove binary file from the source code
VojtechVitek Oct 16, 2022
5fa56db
Merge pull request #111 from golang-cz/remove_binary
VojtechVitek Oct 16, 2022
00fd423
Run CI tests in Github Actions (#112)
VojtechVitek Oct 16, 2022
f1bc82d
Regenerate examples in CI, error out on git diff (#115)
VojtechVitek Oct 16, 2022
4f527e2
webrpc-gen CLI v2 (webrpc-gen v0.6.1) (#110)
VojtechVitek Oct 25, 2022
2e077c4
add Vojtech to authors list, and bump to v0.6.1
pkieltyka Oct 25, 2022
3a2fa0e
v0.6.1
pkieltyka Oct 25, 2022
4fa15b1
update
pkieltyka Oct 25, 2022
053e997
Merge pull request #118 from webrpc/v0-6-1
VojtechVitek Oct 25, 2022
c057621
minor updates + git fetch cache support (#121)
pkieltyka Oct 27, 2022
dad76e4
v0.6.2
pkieltyka Oct 27, 2022
9422d22
webrpc-gen CLI v2: Templates API v0.7.0 (#119)
VojtechVitek Nov 8, 2022
638ff1c
Remove obsolete webrpc version variable (#125)
VojtechVitek Nov 9, 2022
c16baec
gen: use just the base filename of the cli in the template var (#129)
pkieltyka Nov 11, 2022
babae20
Schema: Remove unused kind T_Primitive (#126)
VojtechVitek Nov 11, 2022
a052138
Export schema.VarType expression (#128)
VojtechVitek Nov 11, 2022
3f15b9f
Upgrade golang-basics example to chi v5 (#130)
VojtechVitek Nov 14, 2022
22c3a14
Update node-ts example with an empty response type (#131)
VojtechVitek Nov 14, 2022
5e1fb05
Fix methods with no response value (#133)
VojtechVitek Nov 14, 2022
7bcb3c4
Apply the fetch wrapper fixes from typescript/javascript generators (…
VojtechVitek Nov 16, 2022
25b42f6
Update dependencies (#137)
VojtechVitek Nov 16, 2022
6c3057e
Downgrade go.mod "go" directive back to Go 1.16 (#138)
VojtechVitek Nov 16, 2022
cb7195e
Run CI tests against Go 1.16 and 1.19 (#139)
VojtechVitek Nov 19, 2022
bd231de
Fix go install (#140)
VojtechVitek Nov 19, 2022
09fd29b
CI: Run Goreleaser on new git tag (#142)
VojtechVitek Nov 20, 2022
703a53e
Publish webrpc-gen as a Homebrew tap automatically (#144)
VojtechVitek Nov 21, 2022
c479a6f
Build and publish Docker image on new git tag (#145)
VojtechVitek Nov 21, 2022
3b543f4
README: Add Install steps, improve Getting started and Release notes …
VojtechVitek Nov 25, 2022
e4b2391
webrpc-gen v0.8.0 - Add sort, trimPrefix and trimSuffix template func…
VojtechVitek Nov 25, 2022
155fd9b
webrpc-gen v0.8.0: Implement template arrays (#149)
VojtechVitek Nov 25, 2022
5f36bea
Improve release notes (#150)
VojtechVitek Nov 27, 2022
e4fadb8
Examples: Print available commands when invoking make (#152)
VojtechVitek Nov 28, 2022
042aa56
Bump minimatch from 3.0.4 to 3.1.2 in /_examples/node-ts/webapp (#151)
dependabot[bot] Nov 28, 2022
67409a6
print summary after code generation (#155)
pkieltyka Nov 30, 2022
aa4402f
update print summary layout
pkieltyka Dec 1, 2022
918512a
Bump decode-uri-component from 0.2.0 to 0.2.2 in /_examples/node-ts/w…
dependabot[bot] Dec 3, 2022
a55acf6
Bump qs from 6.5.2 to 6.5.3 in /_examples/node-ts/webapp (#158)
dependabot[bot] Dec 13, 2022
3ea8210
Bump express from 4.16.4 to 4.17.3 in /_examples/node-ts/server (#159)
dependabot[bot] Dec 13, 2022
fdd8f05
Update testing suite (#157)
Dec 17, 2022
9bb71d0
Update the new testing suite (#161)
VojtechVitek Dec 18, 2022
0b3c7e2
Go releaser: Build webrpc-test binary (#162)
VojtechVitek Dec 18, 2022
935d0a4
Github actions: Cache webrpc templates between CI jobs (#166)
VojtechVitek Dec 21, 2022
d4cca79
Relax template cache invalidation (#165)
VojtechVitek Dec 21, 2022
d84328a
Github CI: Run client-server interoperability test (golang@latest <->…
VojtechVitek Dec 21, 2022
30ed299
Internal renaming (#168)
VojtechVitek Dec 21, 2022
945fe4c
Move VERSION to top-level package (#169)
VojtechVitek Dec 21, 2022
5e6d1b8
v0.9.0: Fix non-deterministic schema hash (#172)
VojtechVitek Dec 24, 2022
80d284b
Improve testing suite (#174)
LukasJenicek Dec 28, 2022
25708e7
v0.9.0: Rename RIDL "message" to "struct", schema "messages" to "type…
VojtechVitek Dec 28, 2022
0339b83
Allow webrpc-test binary to print out ridl scheme (#176)
LukasJenicek Dec 29, 2022
e7fd8ea
Fix CI: Regenerate all _examples/ (#177)
VojtechVitek Dec 29, 2022
4326cfc
Invalidate Github Actions cache every day (#180)
VojtechVitek Dec 29, 2022
92e3dbe
v0.9.0 changelog: Document ENUM type JSON schema changes (#179)
VojtechVitek Dec 29, 2022
4fed3b0
Accept io.FS in RIDL parser (#178)
VojtechVitek Dec 29, 2022
3f2508a
Improve interoperability test suite: Add more RPC methods to TestApi …
VojtechVitek Dec 30, 2022
aabb887
Bump to [email protected] (#182)
VojtechVitek Dec 30, 2022
830018c
Bump json5 from 1.0.1 to 1.0.2 in /_examples/node-ts/webapp (#184)
dependabot[bot] Jan 5, 2023
38d2e8e
gen/README.md: Fix join() template function documentation (#185)
VojtechVitek Jan 5, 2023
c9b52ec
Remove unnecessary schema.VarName type (#186)
VojtechVitek Jan 5, 2023
a06c25d
Define custom errors in RIDL (#187)
VojtechVitek Jan 13, 2023
382045b
Add interoperability RIDL<->JSON golden test file (#188)
VojtechVitek Jan 14, 2023
28be4f5
Fix clean GH Actions cache job (#189)
VojtechVitek Jan 14, 2023
58ba5e0
Update the RIDL error syntax & parser (#191)
VojtechVitek Mar 3, 2023
bf9d1a7
Fix default error HTTP status code, add more RIDL tests (#192)
VojtechVitek Mar 3, 2023
4babe29
gen/README.md: Document schema errors, fix link (#194)
VojtechVitek Mar 9, 2023
5de497d
Implement interoperability tests for schema errors (v0.11.0) (#193)
VojtechVitek Mar 9, 2023
503d4b5
Add Go 1.20 to CI matrix (#195)
VojtechVitek Mar 9, 2023
a6758ac
Add built-in webrpc errors (#196)
VojtechVitek Mar 11, 2023
e8a5e62
Schema errors: HTTP status code must be between 400-599 (#197)
VojtechVitek Mar 11, 2023
ee01a05
Add interoperability test for error cause (#198)
VojtechVitek Mar 11, 2023
e442000
Bump to v0.11.0
VojtechVitek Mar 11, 2023
71d6e69
Bump to v0.11.0 - regenerate examples (#199)
VojtechVitek Mar 11, 2023
1e5d18b
Update links to migration guide
VojtechVitek Mar 11, 2023
bf6dd73
Update to latest Go and TS gens with schema support (#200)
VojtechVitek Mar 15, 2023
9f39e57
Add release notes / changelog for v0.11.0 (#201)
VojtechVitek Mar 23, 2023
cbf618c
Bump version to v0.12.x-dev
VojtechVitek Mar 23, 2023
664a6c1
Regenerate examples
VojtechVitek Mar 23, 2023
d31c49f
Fix windows path handling (#202)
pieter-lazzaro Jun 5, 2023
bdcd995
Regenerate examples (latest TypeScript example) (#207)
VojtechVitek Jun 5, 2023
0d39e64
Add `webrpc-test -printJSON' (#206)
VojtechVitek Jun 5, 2023
3d8704f
Implement `webrpc-test -waitForServer -timeout=10s' (#208)
VojtechVitek Jun 6, 2023
ed201f3
Fix examples after introducing customer webrpc errors (#209)
LukasJenicek Jun 13, 2023
94335ea
Template generator: Implement generic array functions (#210)
VojtechVitek Jul 10, 2023
199cc32
Bump semver from 5.7.0 to 5.7.2 in /_examples/node-ts/webapp (#212)
dependabot[bot] Jul 12, 2023
feb0a66
cosmetic, errors should be defined before services
pkieltyka Jul 14, 2023
ffdb764
add Unauthorized and PermissionDenied types in golang-basics example
pkieltyka Jul 14, 2023
7fe8d0a
example (golang-basics): demo how to use ErrorWithCause(..)
pkieltyka Jul 14, 2023
4beb9b2
Update to latest [email protected] generator (#217)
VojtechVitek Jul 20, 2023
2138cff
Remove github.com/pkg/errors (#216)
VojtechVitek Jul 20, 2023
35b6b82
Fix duplicate or invalid json fields (#218)
VojtechVitek Jul 20, 2023
54390e6
errors, add WebrpcInternalError and set HTTPStatus 400 default on Err…
pkieltyka Jul 24, 2023
21b85db
make generate
VojtechVitek Jul 24, 2023
94a3be4
Bump to v0.13.0-dev (#220)
VojtechVitek Jul 27, 2023
7bb6bd8
webrpc-gen: Add -target=json CLI flag (#219)
VojtechVitek Jul 27, 2023
20c8d34
Add v0.12.0 changelog
VojtechVitek Jul 27, 2023
c1485fb
Fix panic
VojtechVitek Jul 27, 2023
57f34b2
Generate .json schema in tests folder
VojtechVitek Jul 27, 2023
38f3328
Implement dump template function (#221)
VojtechVitek Jul 28, 2023
d25eb32
Implement hasField template function (#222)
VojtechVitek Jul 28, 2023
e85039a
Generate code to the output file even on formatting error (#223)
VojtechVitek Jul 28, 2023
31da006
Implement stderrPrint template function, suppress <nil> output (#224)
VojtechVitek Jul 28, 2023
5e6cf30
Add -target=debug to print schema object incl. Go type information (#…
VojtechVitek Aug 1, 2023
2bdd3f5
Make -target=debug output idempotent, track tests schema (#226)
VojtechVitek Aug 1, 2023
bbb62bb
Indent -target=debug output with tabs for better readability
VojtechVitek Aug 1, 2023
ca6fbe4
webrpc-gen: Print custom targets properly
VojtechVitek Aug 5, 2023
414f37b
Update to [email protected]: Simplify Enums to TextMarshalers (#228)
VojtechVitek Aug 7, 2023
6af57de
ridl rpc succinct form (#229)
pkieltyka Aug 7, 2023
edf4584
Bump to v0.14.0-dev
VojtechVitek Aug 20, 2023
241d7fa
Regenerate examples
VojtechVitek Aug 23, 2023
babbc63
Update to [email protected] (#230)
VojtechVitek Aug 25, 2023
704ae5a
Update to [email protected] (#234)
VojtechVitek Sep 27, 2023
cad83cd
Regenerate using latest [email protected] template (#240)
VojtechVitek Nov 28, 2023
6a49c7a
Remove obsolete example .gen.go file (#238)
VojtechVitek Nov 28, 2023
4c5fdf5
Remove the use of obsolete io/ioutil pkg in RIDL tests (#239)
VojtechVitek Nov 28, 2023
a0a775e
Add missing go.mod to golang-imports example (#241)
VojtechVitek Nov 28, 2023
61d6934
RIDL parser: Error out if stream is defined per argument type (#242)
VojtechVitek Nov 28, 2023
c02074c
Define new webrpc errors (#244)
VojtechVitek Dec 11, 2023
cbba50d
Support enum strings (#247)
LukasJenicek Feb 28, 2024
bce5907
regenerate examples with latest gen-golang (#250)
LukasJenicek Feb 29, 2024
4e2e933
do not create cache directory if there is 0 templates (#249)
LukasJenicek Mar 4, 2024
8797f91
get all required fields (#253)
LukasJenicek Mar 5, 2024
428039b
parse comments and store them to webrpc.schema (#252)
LukasJenicek Mar 6, 2024
6028e0d
Add replaceAll function to template functions (#257)
LukasJenicek Mar 8, 2024
e47820e
parse multiline comments 2 lines and more (#258)
LukasJenicek Mar 11, 2024
27312f0
bump webrpc version (#259)
LukasJenicek Mar 11, 2024
5fa7ece
Add Kotlin client generator (#260)
VojtechVitek Mar 12, 2024
b7ac1f3
Regenerate examples with latest [email protected] (#261)
VojtechVitek Mar 12, 2024
b42a1c8
Move .goreleaser outside of Github workflows folder (#262)
VojtechVitek Mar 12, 2024
8c823bf
Infer webrpc version from Go module or git history, if not set (#263)
VojtechVitek Mar 13, 2024
a1df284
Fix actions/checkout@v4 git clone issue on push tags
VojtechVitek Mar 13, 2024
93923cf
Fix .goreleaser path
VojtechVitek Mar 13, 2024
6fbd981
Fix version: git describe --tags (#265)
VojtechVitek Apr 3, 2024
a3fb4fd
Embed default templates into webrpc-gen via Go modules (#266)
VojtechVitek Apr 4, 2024
3d61e00
Bump express from 4.17.3 to 4.19.2 in /_examples/node-ts/server (#264)
dependabot[bot] Apr 4, 2024
20562c5
Use embedded templates for cached git URLs, improve webrpc-gen help (…
VojtechVitek Apr 5, 2024
80d62e2
internal comments (#268)
pkieltyka Apr 5, 2024
bf4a196
README, mention vscode plugin for RIDL syntax highlighting
pkieltyka Apr 5, 2024
6cedd2c
fix parsing comments with http scheme and fqdn (#270)
LukasJenicek Apr 8, 2024
0e4e294
use different url in tests (#271)
LukasJenicek Apr 8, 2024
3f48bd0
keep empty lines while parsing comments (#272)
LukasJenicek Apr 8, 2024
f18099e
Webrpc SSE streaming examples (#237)
VojtechVitek Apr 8, 2024
7e78d75
Bump vite from 5.0.2 to 5.0.13 in /_examples/golang-sse/webapp (#273)
dependabot[bot] Apr 8, 2024
d139a28
Update go.mod deps, bump to Go 1.19 (#274)
VojtechVitek Apr 8, 2024
71e3749
Remove reserved keyword in Dart (#276)
VojtechVitek Apr 9, 2024
662317e
additional generator functions (#277)
austinmilt Apr 12, 2024
bc14da9
declare the timestamp standard (#279)
austinmilt Apr 12, 2024
c4ba018
skip comment when its 2 lines above (#280)
LukasJenicek Apr 15, 2024
c85bc8c
Golang webrpc streaming client fix (#282)
VojtechVitek Apr 17, 2024
a686ba9
Update to [email protected] and all other dependencies (Go 1.19 compatib…
VojtechVitek Apr 23, 2024
0d54fed
Update to [email protected] (#287)
VojtechVitek Apr 24, 2024
3530848
Embbed dart client into webrpc-gen (#288)
VojtechVitek Apr 25, 2024
25dd0b0
Goreleaser: Try to fix changelog with github-native impl (#289)
VojtechVitek Apr 25, 2024
b264dbd
Update gitfs dependencies using fork (#290)
klaidliadon May 20, 2024
8ba501e
Update to github.com/posener/[email protected] (#291)
VojtechVitek May 21, 2024
36454a0
Enum Type and `listElemType` fix (#294)
klaidliadon Jun 18, 2024
44b235f
Add tests for new enum methods (#296)
klaidliadon Jun 18, 2024
4541893
Bump ws from 5.2.2 to 5.2.4 in /_examples/node-ts/webapp (#295)
dependabot[bot] Jun 18, 2024
56462b0
Fix GoReleaser (#297)
VojtechVitek Jun 18, 2024
7f0949c
Update to goreleaser/goreleaser-action@v6 with v2 yaml (#298)
VojtechVitek Jun 18, 2024
f5ab463
Update to [email protected], fix hello-webrpc example (#299)
VojtechVitek Jun 21, 2024
8d197ff
Service method annotations (#308)
LukasJenicek Oct 2, 2024
1d80b37
update gen-golang to v0.15.0 (#312)
LukasJenicek Oct 2, 2024
429add8
Improve Makefile, auto-generate 'make all' (#313)
VojtechVitek Oct 2, 2024
eb617cf
update to [email protected] (#315)
VojtechVitek Oct 2, 2024
6e8be5b
Update deps
VojtechVitek Oct 2, 2024
06e90ac
Revert "Update deps"
VojtechVitek Oct 2, 2024
2a1d939
Match services and ignore methods with specific annotations (#314)
LukasJenicek Oct 3, 2024
091a81b
annotation parser improvements (#316)
LukasJenicek Oct 3, 2024
f0558f2
Add template version and template target to template vars (#310)
LukasJenicek Oct 7, 2024
73ec492
update openapi to latest version (#317)
LukasJenicek Oct 8, 2024
4ee0d88
match specific annotations (#318)
LukasJenicek Oct 9, 2024
f6584bc
mention ridlfmt and add it to example (#321)
LukasJenicek Oct 17, 2024
18c094a
render schema hash if schema version in ridl is empty (#322)
LukasJenicek Oct 21, 2024
f7f4447
Update versions of gen-golang and gen-typescript (#323)
LukasJenicek Oct 22, 2024
96d144e
Remove binary from source code (#326)
VojtechVitek Oct 31, 2024
74474fb
update gen-typescript to v0.15.1 (#327)
LukasJenicek Nov 4, 2024
1dbf494
Update examples - add Webrpc header to CORS (#324)
VojtechVitek Nov 5, 2024
11da120
Update gen-golang to v0.16.1 (#328)
david-littlefarmer Nov 6, 2024
8e9376d
bump gen-golang and gen-typescript to latest version (#329)
LukasJenicek Nov 14, 2024
a4cca8b
RIDL: Fix importing errors (#331)
VojtechVitek Nov 21, 2024
a5b6252
Update to [email protected] and [email protected] (#333)
VojtechVitek Nov 28, 2024
08c58a5
Update to [email protected] (#336)
VojtechVitek Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .github/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# See documentation at https://goreleaser.com/customization/build.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json

version: 2

project_name: webrpc

builds:
- id: webrpc-gen
main: ./cmd/webrpc-gen
binary: webrpc-gen
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
ldflags:
- -s -w -X github.com/webrpc/webrpc.VERSION=v{{.Version}}
- id: webrpc-test
main: ./cmd/webrpc-test
binary: webrpc-test
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
ldflags:
- -s -w -X github.com/webrpc/webrpc.VERSION=v{{.Version}}

archives:
- id: webrpc-gen
builds:
- webrpc-gen
name_template: "{{ .Binary }}.{{ .Os }}-{{ .Arch }}"
format: binary
- id: webrpc-test
builds:
- webrpc-test
name_template: "{{ .Binary }}.{{ .Os }}-{{ .Arch }}"
format: binary

checksum:
name_template: "checksums.txt"

release:
footer: |
## Docker
```
docker pull ghcr.io/webrpc/webrpc-gen:v{{.Version}}
```

Example: `docker run -v $PWD:$PWD ghcr.io/webrpc/webrpc-gen:v{{.Version}} -schema=$PWD/api.ridl -target=golang`

## Homebrew
```
brew tap webrpc/tap
brew install webrpc-gen
```

## Build from source
```
go install -ldflags="-s -w -X github.com/webrpc/webrpc.VERSION=v{{.Version}}" github.com/webrpc/webrpc/cmd/webrpc-gen@v{{.Version}}
```

## Download binaries
macOS: [amd64](https://github.com/webrpc/webrpc/releases/download/v{{.Version}}/webrpc-gen.darwin-amd64), [arm64](https://github.com/webrpc/webrpc/releases/download/v{{.Version}}/webrpc-gen.darwin-arm64) (Apple Silicon)
Linux: [amd64](https://github.com/webrpc/webrpc/releases/download/v{{.Version}}/webrpc-gen.linux-amd64), [arm64](https://github.com/webrpc/webrpc/releases/download/v{{.Version}}/webrpc-gen.linux-arm64)
Windows: [amd64](https://github.com/webrpc/webrpc/releases/download/v{{.Version}}/webrpc-gen.windows-amd64.exe), [arm64](https://github.com/webrpc/webrpc/releases/download/v{{.Version}}/webrpc-gen.windows-arm64.exe)

changelog:
use: github-native
sort: asc

brews:
- name: webrpc-gen
ids:
- webrpc-gen
repository:
owner: webrpc
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: goreleaserbot
email: [email protected]
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/webrpc/webrpc"
description: "generate source code for your target language from webrpc schema"
license: "MIT"
- name: webrpc-test
ids:
- webrpc-test
repository:
owner: webrpc
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: goreleaserbot
email: [email protected]
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/webrpc/webrpc"
description: "generate source code for your target language from webrpc schema"
license: "MIT"
17 changes: 17 additions & 0 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Clean cache
on:
schedule:
- cron: "0 0 * * *" # every day (min hour dayOfMonth month dayOfWeek)

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
gh actions-cache list
gh actions-cache delete webrpc-cache --confirm || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test

on:
push:
branches:
- master
pull_request:
branches:
- "**"

jobs:
test:
strategy:
matrix:
go-version: ["1.22", "1.19"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 20
fetch-tags: true
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Set up webrpc cache folder
uses: actions/cache@v4
with:
key: webrpc-cache
path: /tmp/webrpc-cache
- name: Test
run: make test

examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 20
fetch-tags: true
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Set up webrpc cache folder
uses: actions/cache@v4
with:
key: webrpc-cache
path: /tmp/webrpc-cache
- name: Build
run: make install
- name: Regenerate examples
run: make generate
- name: Git diff of regenerated examples
run: make diff
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release tag

on:
push:
tags:
- "v*"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release -f .github/.goreleaser.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log into Github registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Docker build
run: |
docker build --build-arg VERSION=${GITHUB_REF##*/} -t ghcr.io/webrpc/webrpc-gen:${GITHUB_REF##*/} -t ghcr.io/webrpc/webrpc-gen:latest .
docker push ghcr.io/webrpc/webrpc-gen:${GITHUB_REF##*/}
docker push ghcr.io/webrpc/webrpc-gen:latest
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

Loading