Skip to content

Commit

Permalink
fix: update README in dist workflow (#47)
Browse files Browse the repository at this point in the history
* fix: update README in dist workflow

* chore: extract major version from package.json and replace all usages in readme

Co-authored-by: hnrkndrssn <henrik@henrikandersson.org>
  • Loading branch information
jbristowe and hnrkndrssn committed Jun 21, 2022
1 parent 75f5230 commit ff01740
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/dist.yml
Expand Up @@ -14,9 +14,19 @@ jobs:
run: npm ci
- name: build
run: npm run build
- name: update README
run: |-
MAJOR_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[", ]//g' \
| awk -F. '{ print $1 }')
sed -i "s/\(uses: OctopusDeploy\/push-build-information-action@\).*/\1v${MAJOR_VERSION}/g" README.md
- name: commit
run: |-
git config --global user.name "team-integrations-fnm-bot"
git config user.email 'integrationsfnmbot@octopus.com '
git config user.email 'integrationsfnmbot@octopus.com'
git add README.md
git add dist/
git diff-index --quiet HEAD || (git commit -m "chore: build dist" && git push origin)
git diff-index --quiet HEAD || (git commit -m "chore: build dist and update README" && git push origin)

0 comments on commit ff01740

Please sign in to comment.