Skip to content

Commit 6778a81

Browse files
committed
Update version in core/api.cfc as part of release automation
1 parent 1b001dc commit 6778a81

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,17 @@ jobs:
4141
- name: bump version
4242
run: npm version ${{ github.event.inputs.version }}
4343

44-
- name: Push latest version
45-
run: git push origin main --follow-tags
46-
4744
- name: get-npm-version
4845
id: package-version
4946
uses: martinbeentjes/npm-get-version-action@master
5047

51-
- name: Create Release Notes
52-
uses: actions/[email protected]
53-
with:
54-
github-token: ${{secrets.GITHUB_TOKEN}}
55-
script: |
56-
await github.request(`POST /repos/${{ github.repository }}/releases`, {
57-
tag_name: "v${{ steps.package-version.outputs.current-version }}",
58-
generate_release_notes: true
59-
});
48+
- name: Update version in api.cfc
49+
run: |
50+
cat core/api.cfc | sed 's/local\._taffy\.version = \"[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\"/local._taffy.version = "${{ steps.package-version.outputs.current-version }}"/gi' > core/api.new.cfc
51+
rm -f core/api.cfc
52+
mv core/api.new.cfc core/api.cfc
53+
git add core/api.cfc
54+
git commit --amend --no-edit
6055
6156
- name: Cut a docs file for the new release
6257
run: |
@@ -66,8 +61,20 @@ jobs:
6661
rm -f docs/readme.md
6762
mv docs/readme-next.md docs/readme.md
6863
git add docs/readme.md
69-
git commit -m"New doc file ${{ steps.package-version.outputs.current-version }}.md"
70-
git push
64+
git commit --amend --no-edit
65+
66+
- name: Push latest version
67+
run: git push origin main --follow-tags
68+
69+
- name: Create Release Notes
70+
uses: actions/[email protected]
71+
with:
72+
github-token: ${{secrets.GITHUB_TOKEN}}
73+
script: |
74+
await github.request(`POST /repos/${{ github.repository }}/releases`, {
75+
tag_name: "v${{ steps.package-version.outputs.current-version }}",
76+
generate_release_notes: true
77+
});
7178
7279
- name: Tweet-trigger-publish-release
7380
uses: mugi111/[email protected]

0 commit comments

Comments
 (0)