forked from coenjacobs/mozart
-
Notifications
You must be signed in to change notification settings - Fork 25
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
1 parent
8cacf47
commit 1874b3b
Showing
2 changed files
with
41 additions
and
1 deletion.
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,34 @@ | ||
# When a new version number is added to the changelog, update the bin. | ||
|
||
name: Update version from changelog | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'CHANGELOG.md' | ||
|
||
|
||
jobs: | ||
update-version: | ||
runs-on: ubuntu-latest | ||
name: Create Strauss phar on new release | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
|
||
- name: "Edit `strauss/bin/strauss` to update the version number" | ||
env: | ||
CURRENT_RELEASE: cat CHANGELOG.md | grep --max-count=1 -o '##.*' | awk '{print $2}' | ||
run: | | ||
find bin -name 'strauss' -exec sed -i "s/}, '[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*');/}, '$CURRENT_RELEASE');/" {} + | ||
- name: Commit updated README.md | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
branch: master | ||
file_pattern: "bin/strauss" | ||
commit_message: "🤖 Update version number in bin" |
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