-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate deployment of new versions #3
Open
n-bernat
wants to merge
7
commits into
lucide-icons:main
Choose a base branch
from
n-bernat:task/ci-deployment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Open
bartekpacia
reviewed
Mar 30, 2024
Comment on lines
+20
to
+44
run: | | ||
RELEASE=$(curl -s "https://api.github.com/repos/lucide-icons/lucide/releases/latest") | ||
TAG=$(printf "%s" $RELEASE | jq -r .tag_name) | ||
echo "TAG=$TAG" >> $GITHUB_ENV | ||
echo "Latest release: $TAG" | ||
|
||
if [ $(git tag -l "$TAG") ]; then | ||
echo "No changes since the latest release - aborting." | ||
echo "EXISTS=true" >> $GITHUB_ENV | ||
exit 0 | ||
fi | ||
|
||
URL=$(printf "%s" $RELEASE | jq -r '.assets[] | select(.name | startswith("lucide-font")) | .browser_download_url') | ||
|
||
echo "Downloading $URL" | ||
curl -vLJO -H 'Accept: application/octet-stream' $URL | ||
unzip -o lucide-font-*.zip | ||
|
||
echo "Updating assets" | ||
mv lucide-font/info.json assets/info.json | ||
mv lucide-font/lucide.ttf assets/lucide.ttf | ||
|
||
echo "Removing leftovers" | ||
rm -rf lucide-font | ||
rm -f lucide-font-*.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer to keep such longer scripts in a separate executable file, and just call that file from the CI pipeline.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
pubspec.yaml
lint
with the officialflutter_lints
package and fixed a config file for lintshtml
generate_fonts.dart
info.json
filelucide_icons.dart
generate.yaml
workflow (n-bernat@36fad92)generate.yaml
lucide-icons/lucide
info.json
and copies those files toassets
publish.yaml
--force
flag and separate steps to install Dart and Flutter due to some tooling issues Generalize publishing GitHub Action to support flutter dart-lang/setup-dart#68Pub.dev configuration
In https://pub.dev/packages/lucide_icons/admin someone with admin rights has to enable publishing from GitHub Actions
Example run: https://github.com/n-bernat/lucide-flutter/actions/runs/8088943739
Example changes: n-bernat@935fbf8