Skip to content

Commit

Permalink
On closing release bump version directly to main without a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
ausias-armesto committed Oct 3, 2024
1 parent 66602c7 commit 7adb4aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main # if you want to use a different branch keep in mind that the bump version step will be affected
token: '${{ secrets.GH_RUNNER_TOKEN }}'

- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
Expand Down Expand Up @@ -76,23 +79,16 @@ jobs:
- name: Bump Version
id: bump
run: |
npm version ${{ inputs.release_type }} --no-git-tag-version
BUMP_VERSION=$(node -p "require('./package.json').version")
npm version "${{ inputs.release_type }}" --no-git-tag-version
BUMP_VERSION=$(jq -r '.version' package.json)
echo "bump_version=${BUMP_VERSION}" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
- uses: EndBug/add-and-commit@v9
with:
token: ${{ secrets.GH_RUNNER_TOKEN }}
commit-message: 'Bump to version ${{ steps.bump.outputs.bump_version }}'
base: main
title: 'Open release ${{ steps.bump.outputs.bump_version }}'
body: 'The scope of this PR is to bump the new release ${{ steps.bump.outputs.bump_version }}'
branch: bot/open-${{ inputs.release_type }}-${{ steps.bump.outputs.bump_version }}
delete-branch: true
assignees: ${{ github.actor }}
reviewers: 'esterlus'
team-reviewers: '@hoprnet/hopr-products-team'
add: 'package.json'
new_branch: main
message: 'Bump to version ${{ steps.bump.outputs.bump_version }}'
pathspec_error_handling: exitImmediately

- name: Notify new release
uses: zulip/github-actions-zulip/send-message@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ coverage/
# dependencies
node_modules/
.vscode/
.npmrc

# Created by github pipeline
gha-creds-*.json

0 comments on commit 7adb4aa

Please sign in to comment.