-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add publish setup for plain svg icons in NPM (#160)
* Initial proof of publishing raw svg files in npm * Added new package to publish svg-icons module * Undo some original importer package changes. * Renamed and made fill replacement work on Windows * Fixed fill replace Fixed selector generation for Android Updated version and sequence for svg publishing * Revert * Fixed build error from missing dist directory Organized package file * Resolved comments Added readme * Finish package rename Co-authored-by: Brian Heston <[email protected]>
- Loading branch information
Showing
12 changed files
with
1,835 additions
and
416 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
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ env: | |
jobs: | ||
publish-library: | ||
if: "!contains(github.event.head_commit.author.email, '[email protected]')" | ||
name: Publish mobile libraries | ||
name: Publish icon libraries | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -107,6 +107,12 @@ jobs: | |
sed -i.bk -r "s/version: [0-9]+\.[0-9]+\.[0-9]+/version: $NEW_VERSION/g" flutter/pubspec.yaml | ||
rm flutter/pubspec.yaml.bk | ||
# Needs to be "-E" instead of "-r" on macOS | ||
- name: Replace version number in svg-icons/package.json | ||
run: | | ||
sed -i.bk -r "s/\"version\": \"[0-9]+\.[0-9]+\.[0-9]+\"/\"version\": \"$NEW_VERSION\"/g" packages/svg-icons/package.json | ||
rm packages/svg-icons/package.json.bk | ||
# Needs to be "-E" instead of "-r" on macOS | ||
- name: Replace version number in _manifest.json | ||
run: | | ||
|
@@ -119,6 +125,15 @@ jobs: | |
sed -i.bk -r "s/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]Z/$(date -u +%Y-%m-%dT%RZ)/" _iconCloud/manifest.json | ||
rm _iconCloud/manifest.json.bk | ||
## Publish svg icons | ||
- name: Run svg publish | ||
run: npm publish | ||
working-directory: packages/svg-icons | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
with: | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Update icon sheet | ||
run: python3 generate_icons_md.py | ||
|
||
|
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
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
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
Oops, something went wrong.