Skip to content

Commit

Permalink
Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
Will committed Aug 14, 2023
1 parent bab1c4c commit d5878a3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release
on:
release:
types: [published]

jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Display version
run: echo '${{ github.event.release.tag_name }}'
- name: Update package.json version
run: |
npm version ${{ github.event.release.tag_name }}
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "[Automated Commit] Update version to ${{ github.event.release.tag_name }}"
git push
- name: Update react package.json version
run: |
cd react
npm version ${{ github.event.release.tag_name }}
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "[Automated Commit] Update version to ${{ github.event.release.tag_name }}"
git push
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "A large collection of high quality SVG icons with an MIT license",
"licence": "MIT",
"scripts": {
"build": "node ./scripts/build.js",
"update_icons": "node ./scripts/generatePNG.js && node ./scripts/build.js && node ./scripts/build_react.js && cd react && npm run build",
"publish_svg_library": "np minor --tests=false",
"publish_react_library": "cd react && np minor --tests=false",
"build": "node ./scripts/build.js",
"generate_web": "node ./scripts/generatePNG.js && npm run build",
"build_react": "node ./scripts/build_react.js",
"prebuild_react": "npm run build",
Expand Down

0 comments on commit d5878a3

Please sign in to comment.