Skip to content

Commit

Permalink
ci: Add release-please for CHANGELOG management #TSI-1713 (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
jablan authored Jun 5, 2023
1 parent 67b31b3 commit bc29b6c
Show file tree
Hide file tree
Showing 27 changed files with 4,792 additions and 161 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Check PR title"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83 changes: 83 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
on:
push:
branches:
- master
name: Run Release Please
jobs:
release-please-python:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
config-file: release-please/config-python.json
manifest-file: release-please/manifest-python.json
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}
release-please-java:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
config-file: release-please/config-java.json
manifest-file: release-please/manifest-java.json
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}
release-please-typescript:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
config-file: release-please/config-typescript.json
manifest-file: release-please/manifest-typescript.json
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}
release-please-go:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
config-file: release-please/config-go.json
manifest-file: release-please/manifest-go.json
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}
release-please-cli:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
config-file: release-please/config-cli.json
manifest-file: release-please/manifest-cli.json
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}
release-please-ruby:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
config-file: release-please/config-ruby.json
manifest-file: release-please/manifest-ruby.json
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}
release-please-php:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
config-file: release-please/config-php.json
manifest-file: release-please/manifest-php.json
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
golang 1.19.1
nodejs 16.13.1
maven 3.9.1
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ docs: lint bundle
npx tsc ./doc/main.ts --outFile ./doc/main.js
npx terser ./doc/main.js --compress --mangle -o ./doc/main.js
ruby:
openapi-generator-cli generate -i tmp/compiled.yaml -g ruby -o clients/ruby -t ./openapi-generator/templates/ruby-client -c ./openapi-generator/ruby_lang.yaml
openapi-generator-cli generate -i tmp/compiled.yaml -g ruby -o clients/ruby -c ./openapi-generator/ruby_lang.yaml
go:
openapi-generator-cli generate -i tmp/compiled.yaml -g go -o clients/go -t ./openapi-generator/templates/go -c ./openapi-generator/go_lang.yaml
openapi-generator-cli generate -i tmp/compiled.yaml -g go -o clients/go -c ./openapi-generator/go_lang.yaml
go install golang.org/x/tools/cmd/goimports@latest
goimports -w clients/go
cd clients/go && go mod tidy
typescript:
openapi-generator-cli generate -i tmp/compiled.yaml -g typescript-fetch -o clients/typescript -t ./openapi-generator/templates/typescript-fetch -c ./openapi-generator/typescript_lang.yaml
openapi-generator-cli generate -i tmp/compiled.yaml -g typescript-fetch -o clients/typescript -c ./openapi-generator/typescript_lang.yaml
python:
openapi-generator-cli generate -i tmp/compiled.yaml -g python -o clients/python -t ./openapi-generator/templates/python -c ./openapi-generator/python_lang.yaml
openapi-generator-cli generate -i tmp/compiled.yaml -g python -o clients/python -c ./openapi-generator/python_lang.yaml
java:
openapi-generator-cli generate -i tmp/compiled.yaml -g java -o clients/java -t ./openapi-generator/templates/java -c ./openapi-generator/java_lang.yaml
openapi-generator-cli generate -i tmp/compiled.yaml -g java -o clients/java -c ./openapi-generator/java_lang.yaml
php:
openapi-generator-cli generate -i tmp/compiled.yaml -g php -o clients/php -t ./openapi-generator/templates/php -c ./openapi-generator/php_lang.yaml
openapi-generator-cli generate -i tmp/compiled.yaml -g php -o clients/php -c ./openapi-generator/php_lang.yaml
cli:
openapi-generator-cli generate -i tmp/compiled.yaml -g go -o tmp/cli -t ./openapi-generator/templates/cli -c ./openapi-generator/cli_lang.yaml -e handlebars
openapi-generator-cli generate -i tmp/compiled.yaml -g go -o tmp/cli -c ./openapi-generator/cli_lang.yaml -e handlebars
cp tmp/cli/api_* clients/cli/cmd/
cp tmp/cli/README.md clients/cli/
go install golang.org/x/tools/cmd/goimports@latest
Expand Down
1 change: 1 addition & 0 deletions openapi-generator/cli_lang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ generatorName: go
outputDir: clients/cli
packageName: phrase
packageVersion: 2.8.2
templateDir: "openapi-generator/templates/cli"
1 change: 1 addition & 0 deletions openapi-generator/go_lang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ packageVersion: 2.10.1
gitUserId: phrase
gitRepoId: phrase-go
httpUserAgent: Phrase Strings go
templateDir: "openapi-generator/templates/go"
1 change: 1 addition & 0 deletions openapi-generator/java_lang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ scmDeveloperConnection: scm:git:[email protected]:phrase/openapi.git
scmUrl: https://github.com/phrase/openapi
java8: true
dateLibrary: java8
templateDir: "openapi-generator/templates/java"
1 change: 1 addition & 0 deletions openapi-generator/php_lang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ artifactVersion: 1.9.0
gitUserId: phrase
gitRepoId: phrase-php
packageName: phrase-php
templateDir: "openapi-generator/templates/php"
1 change: 1 addition & 0 deletions openapi-generator/python_lang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ packageVersion: 1.9.0
packageUrl: "https://github.com/phrase/phrase-python"
gitUserId: phrase
gitRepoId: phrase-python
templateDir: "openapi-generator/templates/python"
1 change: 1 addition & 0 deletions openapi-generator/ruby_lang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ gemAuthor: Phrase
gemAuthorEmail: '[email protected]'
gitUserId: phrase
gitRepoId: phrase-ruby
templateDir: "openapi-generator/templates/ruby-client"
1 change: 1 addition & 0 deletions openapi-generator/typescript_lang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ outputDir: clients/typescript
npmName: "phrase-js"
npmVersion: 1.9.0
typescriptThreePlus: true
templateDir: "openapi-generator/templates/typescript-fetch"
Loading

0 comments on commit bc29b6c

Please sign in to comment.