Skip to content

Commit

Permalink
Update version in core/api.cfc as part of release automation
Browse files Browse the repository at this point in the history
  • Loading branch information
atuttle committed Feb 15, 2022
1 parent 1b001dc commit 6778a81
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,17 @@ jobs:
- name: bump version
run: npm version ${{ github.event.inputs.version }}

- name: Push latest version
run: git push origin main --follow-tags

- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master

- name: Create Release Notes
uses: actions/github-script@v4.0.2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
await github.request(`POST /repos/${{ github.repository }}/releases`, {
tag_name: "v${{ steps.package-version.outputs.current-version }}",
generate_release_notes: true
});
- name: Update version in api.cfc
run: |
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
rm -f core/api.cfc
mv core/api.new.cfc core/api.cfc
git add core/api.cfc
git commit --amend --no-edit
- name: Cut a docs file for the new release
run: |
Expand All @@ -66,8 +61,20 @@ jobs:
rm -f docs/readme.md
mv docs/readme-next.md docs/readme.md
git add docs/readme.md
git commit -m"New doc file ${{ steps.package-version.outputs.current-version }}.md"
git push
git commit --amend --no-edit
- name: Push latest version
run: git push origin main --follow-tags

- name: Create Release Notes
uses: actions/github-script@v4.0.2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
await github.request(`POST /repos/${{ github.repository }}/releases`, {
tag_name: "v${{ steps.package-version.outputs.current-version }}",
generate_release_notes: true
});
- name: Tweet-trigger-publish-release
uses: mugi111/tweet-trigger-release@v1.1
Expand Down

0 comments on commit 6778a81

Please sign in to comment.