Skip to content

Commit

Permalink
ci: update process to commit and push within the workflow
Browse files Browse the repository at this point in the history
Tag will also be created in the update-icon-version script
  • Loading branch information
ju-Skinner committed Oct 2, 2023
1 parent 6cf390f commit 58ccd20
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/release-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure user
run: |
git config user.name "Kajabi Automation Bot"
git config user.email "[email protected]"
- name: Publish Icons
uses: ./.github/workflows/actions/publish-npm
Expand All @@ -33,3 +37,12 @@ jobs:
token: ${{ secrets.NPM_TOKEN }}
version: ${{ inputs.version }}
working-directory: 'libs/icons'

- name: Commmit version bump
run: |
git config user.name "Kajabi Automation Bot"
git config user.email "[email protected]"
git add libs/icons/package.json package-lock.json
git commit -m "chore(icons): update package lock files for version bump"
git push
shell: bash
4 changes: 1 addition & 3 deletions .scripts/update-icon-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ const run = async () => {
changelogsPath, // Changelogs
path.join(srcIconsBasePath, 'index.html'), // updated homepage with new changelog file
path.join(srcIconsBasePath, 'icon-data.json'), // icon data
path.join(baseIconsPath, 'package.json'), // Icon version bump
'package-lock.json'
])

const msg = `created: ${created.length}, modified: ${modified.length}, renamed: ${renamed.length}, deleted: ${deleted.length}`
await git.commit(`ci(icons): v${iconPkgVersion}, ${msg}`)
await git.tag([`v${iconPkgVersion}`, '-a', '-m', msg]);
await git.tag([`@pine-ds/icons@${iconPkgVersion}`, '-a', '-m', msg]);

process.env.BUMP_TYPE = bumpType;

Expand Down

0 comments on commit 58ccd20

Please sign in to comment.