-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 8567c49.
- Loading branch information
1 parent
029a1f4
commit 66e22e7
Showing
1 changed file
with
3 additions
and
35 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 |
---|---|---|
|
@@ -51,7 +51,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OR_GITHUB_TOKEN }} | ||
BRANCH_NAME: npm-version-patch | ||
steps: | ||
|
||
# CHECKOUT PROJECT | ||
|
@@ -77,7 +76,7 @@ jobs: | |
if [ ${{ inputs.dev }} == true ]; then | ||
echo "TAG_NAME=$(npm version prerelease --preid=${{ inputs.jsTag }} --no-git-tag-version --allow-same-version)" >> $GITHUB_ENV | ||
else | ||
echo "TAG_NAME=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV | ||
echo "TAG_NAME=$(npm version patch)" >> $GITHUB_ENV | ||
fi | ||
# DOWNLOAD CLI IF IT IS A DEV VERSION AND A CLI TAG WAS PROVIDED | ||
|
@@ -94,42 +93,11 @@ jobs: | |
npm ci | ||
npm run build | ||
# CREATE PR FOR VERSION | ||
- name: Create Pull Request | ||
id: create_pr | ||
if: inputs.dev == false | ||
uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ env.GITHUB_TOKEN }} | ||
branch: ${{ env.BRANCH_NAME }} | ||
title: "Update Version - Automated Changes" | ||
body: "This is an automated PR created by GitHub Actions" | ||
base: main | ||
draft: false | ||
|
||
# WAIT FOR PR CREATION | ||
- name: Wait for PR to be created | ||
id: pr | ||
if: inputs.dev == false | ||
uses: octokit/[email protected] | ||
with: | ||
route: GET /repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ env.BRANCH_NAME }} | ||
|
||
# MERGE PR TO MAIN | ||
- name: Merge Pull Request | ||
if: inputs.dev == false | ||
uses: octokit/[email protected] | ||
with: | ||
route: PUT /repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pull-request-number }}/merge | ||
merge_method: squash | ||
# PUSH TAGS IF IT IS A RELEASE | ||
- name: Push tag | ||
- name: Push tag if release | ||
if: inputs.dev == false | ||
run: | | ||
git pull | ||
git tag ${{env.TAG_NAME}} | ||
git push --tags | ||
run: git push && git push --tags | ||
|
||
|
||
# PUBLISH NPM PACKAGE | ||
|