-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature / Automate publishing to PyPI and NPM (#127)
* Add a packaging job in CI to publish to PyPI * Start writing NPM publish task * Use a script to infer the NPM release tag from the version number * Minor fix for version_tag.sh * Minor fix for version_tag.sh * Fix for packaging.yml workflow * Make NPM publish step use NPM token * Test publishing a dev package to NPM * Set registry in .npmrc for publishing * Test publishing a dev build to PYPI * Turn on event guard for PyPI publish action * Use the latest stable Node/Python versions in packaging workflow * Extract the NPM tarball before publishing * Turn on the release guard for NPM publishing, ready to test * Reset the branch trigger for packaging builds, testing complete
- Loading branch information
Martin Traverse
authored
Mar 18, 2022
1 parent
01f2142
commit d352f94
Showing
2 changed files
with
123 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Copyright 2022 Accenture Global Solutions Limited | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# For NPM Publish, we need to specify a release tag | ||
# This ia a quick way to generate the tag based on the full version string | ||
# The version number should be as output from version.sh | ||
|
||
VERSION=$1 | ||
|
||
if echo $VERSION | grep -qv "^[0-9]\+\.[0-9]\+\.[0-9]\+"; then | ||
echo "invalid" | ||
exit -1 | ||
elif echo $VERSION | grep -q "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; then | ||
echo "latest" | ||
elif echo $VERSION | grep -q "dev"; then | ||
echo "dev" | ||
elif echo $VERSION | grep -q "alpha"; then | ||
echo "alpha" | ||
elif echo $VERSION | grep -q "beta"; then | ||
echo "beta" | ||
elif echo $VERSION | grep -q "rc"; then | ||
echo "rc" | ||
else | ||
echo "invalid" | ||
exit -1 | ||
fi |