-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add bump and tag version workflow #11
Open
wa0x6e
wants to merge
13
commits into
main
Choose a base branch
from
inject-dotenv-content
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
61554e5
feat: allow injecting new vars to .env.test
wa0x6e beb0d4e
fix: rename extension to YML
wa0x6e 00b0e11
feat: upload sourcemaps to sentry
wa0x6e e803b78
feat: add workflow to auto bump and tag version
wa0x6e e4f2b93
fix: update checkout min rqeuired version
wa0x6e 9da72ce
Merge branch 'main' into inject-dotenv-content
wa0x6e 34066b5
fix: save tag as output
wa0x6e d566bfb
fix: fix mising env var
wa0x6e d69ebb0
fix: fix actions outputs
wa0x6e 557b4ea
fix: fix outputs
wa0x6e 44cd335
fix: fix action not being able to push to protected branch
wa0x6e 4361cf9
fix: use custom PAT
wa0x6e efb9f00
fix: tentative fix for PAT permission
wa0x6e File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: Bump version | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
tag-prefix: | ||
required: false | ||
default: 'v' | ||
type: string | ||
outputs: | ||
tag: | ||
description: Newly created tag | ||
value: ${{ jobs.bump-version.outputs.tag }} | ||
|
||
jobs: | ||
bump-version: | ||
name: Bump Version on master | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
outputs: | ||
tag: ${{ steps.save-tag.outputs.tag }} | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
ref: ${{ github.ref }} | ||
|
||
- name: cat package.json | ||
run: cat ./package.json | ||
|
||
- name: Automated Version Bump | ||
id: version-bump | ||
uses: phips28/gh-action-bump-version@master | ||
with: | ||
tag-prefix: ${{ inputs.tag-prefix }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
|
||
- name: cat package.json | ||
run: cat ./package.json | ||
|
||
- name: Output Step | ||
env: | ||
NEW_TAG: ${{ steps.version-bump.outputs.newTag }} | ||
run: echo "new tag $NEW_TAG" | ||
|
||
- name: Save tag to workflow output | ||
env: | ||
NEW_TAG: ${{ steps.version-bump.outputs.newTag }} | ||
id: save-tag | ||
run: echo "tag=$NEW_TAG" >> "$GITHUB_OUTPUT" |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This action will have permission to merge to master.? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works on regular branch. But just tested, and it does not work on protected branch, it requires a
Personal Access Token
, instead ofGITHUB_TOKEN