Skip to content

Commit d929df7

Browse files
ci: update version string in code on release
1 parent 611fbb9 commit d929df7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/release.yml

+22
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,29 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: google-github-actions/release-please-action@v3
19+
id: release
1920
with:
2021
token: ${{ secrets.CI_TOKEN }}
2122
release-type: simple
2223
package-name: rest.nvim
24+
- uses: actions/checkout@v4
25+
if: ${{ steps.release.outputs.prs_created }}
26+
- name: Update Version String
27+
if: ${{ steps.release.outputs.prs_created }}
28+
run: |
29+
new_tag=${{ steps.release.outputs.tag_name }}
30+
31+
echo "Updating \`rest.nvim\` Version to $new_tag"
32+
# sed -ri "s/api\.VERSION\s*=\s*\"[0-9\.\-]+\"$/api.VERSION = \"${new_tag:1}\"/" lua/rest-nvim/api.lua
33+
- name: Commit changes
34+
if: ${{ steps.release.outputs.prs_created }}
35+
uses: stefanzweifel/git-auto-commit-action@v5
36+
with:
37+
commit_message: "chore(api.lua): update version variable"
38+
branch: ${{ github.ref }}
39+
- name: Push to Github
40+
if: ${{ steps.release.outputs.prs_created }}
41+
uses: ad-m/github-push-action@master
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
branch: ${{ github.ref }}

0 commit comments

Comments
 (0)