-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
148 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: builder | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
sdk: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Generate SDK | ||
uses: openapi-generators/openapitools-generator-action@v1 | ||
with: | ||
generator: javascript | ||
openapi-url: https://raw.githubusercontent.com/bavix/gripmock-openapi/master/api.yaml | ||
command-args: -o . --package-name gripmock-sdk-js -c config.yaml | ||
|
||
- name: "Check if build has changed" | ||
if: success() | ||
id: has-changes | ||
run: | | ||
echo "stdout<<EOF" >> $GITHUB_OUTPUT | ||
echo "$(git diff --stat)" >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
- name: "git add --all" | ||
run: git add --all | ||
|
||
- name: Import GPG key | ||
if: ${{ steps.has-changes.outputs.stdout }} | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_BOT }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
fingerprint: ${{ secrets.GPG_FINGERPRINT }} | ||
git_config_global: true | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
git_committer_name: Github bot | ||
git_committer_email: [email protected] | ||
|
||
- name: "Commit files" | ||
if: ${{ steps.has-changes.outputs.stdout }} | ||
env: | ||
GH_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
run: | | ||
gh pr checkout ${{ github.event.pull_request.number }} | ||
git commit -S -m "sdk generated" -a | ||
- name: "Push changes" | ||
if: ${{ steps.has-changes.outputs.stdout }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
run: git push -u origin HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: update changelog | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
changelog: | ||
permissions: | ||
contents: write | ||
secrets: inherit | ||
uses: bavix/.github/.github/workflows/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Publish package to GitHub Packages | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Setup .npmrc file to publish to GitHub Packages | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '21.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
# Defaults to the user or organization that owns the workflow file | ||
scope: '@bavix' | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
gen-client: | ||
# https://github.com/OpenAPITools/openapi-generator | ||
openapi-generator generate -i https://raw.githubusercontent.com/bavix/gripmock-openapi/master/api.yaml -g javascript -o ./generated/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
additionalProperties: | ||
projectName: gripmock-sdk-js | ||
projectVersion: 2.4.0 | ||
licenseName: MIT |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "gripmock-sdk-js", | ||
"version": "2.4.0", | ||
"type": "module", | ||
"description": "GripMock SDK.", | ||
"private": true, | ||
"repository": { | ||
"type": "git", | ||
"url": "github.com/bavix/gripmock-sdk-js" | ||
}, | ||
"keywords": [ | ||
"gripmock", | ||
"sdk" | ||
], | ||
"author": "Maksim Babichev", | ||
"license": "MIT" | ||
} |