Skip to content

Commit

Permalink
ci: changed to update automatically on version control
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoaov committed Jul 20, 2023
1 parent bf604a4 commit c35c202
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release
on:
workflow_dispatch:
workflow_run:
workflows: ['version']
workflows: ['Version']
branches:
- 'master'
- 'main'
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate Version and push to repository
name: Version
permissions:
contents: write
on:
Expand All @@ -8,7 +8,7 @@ on:
- master
- main
jobs:
version:
version-patch:
name: Generate Version
runs-on: ubuntu-latest
steps:
Expand All @@ -20,9 +20,13 @@ jobs:
node-version: 18
- name: Install dependencies
run: npm install
- name: Configure git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email ""
- name: Generate Version
run: |
npm version from-git -m 'chore: release %s' --allow-same-version
npm version ${{ secrets.VERSION_CONTROL }} -m 'chore: release %s' --allow-same-version --no-commit-hooks
- name: Push Version to tags
uses: ad-m/github-push-action@master
with:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c35c202

Please sign in to comment.