-
Notifications
You must be signed in to change notification settings - Fork 4
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
fireblocks_dx_team
committed
Jun 19, 2024
1 parent
62de55d
commit 993cf4e
Showing
5 changed files
with
227 additions
and
186 deletions.
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,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 }} |
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 |
---|---|---|
|
@@ -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 | ||
|
@@ -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 }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.