Skip to content

Commit

Permalink
fix: move the processing from app-build.gradle to build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Arc-E-Tect committed Jul 21, 2024
1 parent 290320b commit 54a2e3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
if: ${{ needs.setup_release.outputs.new_tag_version != '' }}
runs-on: ubuntu-latest
env:
FILE: app/build.gradle
FILE: build.gradle
VERSION_REGEX: "^version = '\\d+\\.\\d+\\.\\d+'$"
steps:
- name: Checkout
Expand All @@ -71,10 +71,8 @@ jobs:
- name: Update version and date in file
if: ${{needs.setup_release.outputs.new_tag_version != ''}}
run: |
echo "new_tag_version=${{ needs.setup_release.outputs.new_tag_version }}"
# Get the version from the output of the Semantic Release step
VERSION=${{ needs.setup_release.outputs.new_tag_version }}
echo "new_tag_version=$VERSION"
# Regular expression to match the string to be replaced
sed -i "s/${{ env.VERSION_REGEX }}/version = '$VERSION'/" ${{ env.FILE }}
Expand Down
2 changes: 1 addition & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
"changelogFile": "CHANGELOG.md"
}],
["@semantic-release/git", {
"assets": ["test.adoc", "file2.md","app/build.gradle", "CHANGELOG.md"],
"assets": ["test.adoc", "file2.md","build.gradle", "CHANGELOG.md"],
"message": "Release <%= nextRelease.version %> - <%= new Date().toLocaleDateString('en-US', {year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' }) %> [skip ci]\n\n<%= nextRelease.notes %>"
}],
"@semantic-release/github",
Expand Down

0 comments on commit 54a2e3a

Please sign in to comment.