Skip to content

Commit

Permalink
Generated SDK #5083
Browse files Browse the repository at this point in the history
  • Loading branch information
fireblocks_dx_team committed Jun 19, 2024
1 parent 62de55d commit 993cf4e
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 186 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Create Pull Request

on:
push:
branches:
- 'fireblocks-api-spec/generated/*'

jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: |
npm install
npm i -g auto-changelog
- name: Bump version and add changelog
run: |
initialTag=v1.1.1
tag="${initialTag//[v]/}"
echo $tag
git remote update
git fetch
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
npm --no-git-tag-version --allow-same-version version $tag
auto-changelog --hide-credit -l 0 -b 3
git add .
git commit -m "release $tag"
git push
create-pull-request:
needs: bump-version
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Create pull request
run: |
gh pr create \
--title "${{ github.event.commits[0].message }}" \
--body "This PR was automatically generated." \
--base master \
--head ${{ github.ref }} \
--reviewer asafs932,zoharsf,YoavBZ
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 changes: 38 additions & 10 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,24 @@ on:
release:
types: [published]
env:
GIT_TERMINAL_PROMPT: 1
GIT_TERMINAL_PROMPT: 1
jobs:
publish:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.RELEASE_TOKEN }}
- uses: actions/setup-node@v2
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: |
- name: Install dependencies
run: |
npm install
npm i -g auto-changelog
- name: Bump version and add changelog
run: |
initialTag=${{ github.event.release.tag_name }}
tag="${initialTag//[v]/}"
echo $tag
Expand All @@ -26,11 +30,35 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
npm --no-git-tag-version --allow-same-version version $tag
npm i -g auto-changelog
auto-changelog --hide-credit -l 0 -b 3
git add .
git commit -m "release $tag"
git push
- run: npm publish
- name: Move tag
run: |
TAG_NAME=${{ github.event.release.tag_name }}
echo $tag
git tag -d $TAG_NAME
git push origin :refs/tags/$TAG_NAME
git tag $TAG_NAME
git push origin $TAG_NAME
publish:
needs: bump-version
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
token: ${{ secrets.RELEASE_TOKEN }}
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
45 changes: 0 additions & 45 deletions CHANGELOG.md

This file was deleted.

Loading

0 comments on commit 993cf4e

Please sign in to comment.