-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: automatic version update (package.json)
- Loading branch information
1 parent
5a08124
commit 08373b4
Showing
3 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Lint Commit Messages | ||
|
||
on: [pull_request] | ||
|
||
permissions: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
name: Demo deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Update package.json version | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
const fs = require('fs'); | ||
const path = 'package.json'; | ||
const packageJson = JSON.parse(fs.readFileSync(path)); | ||
packageJson.version = '${{ github.event.release.tag_name }}'; | ||
fs.writeFileSync(path, JSON.stringify(packageJson, null, 2) + '\n'); | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Commit and push changes | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
git add package.json | ||
git commit -m "Update package version to ${{ github.event.release.tag_name }}" | ||
git push | ||
- uses: akhileshns/[email protected] | ||
with: | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
name: Publish package to GitHub Packages | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|