-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): setup Solo for npm publishing (#724)
Signed-off-by: Nathan Klick <[email protected]>
- Loading branch information
1 parent
2bbcdd2
commit a702e27
Showing
9 changed files
with
42 additions
and
65 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 |
---|---|---|
|
@@ -79,7 +79,7 @@ jobs: | |
- name: Calculate Next Version | ||
env: | ||
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GIT_AUTHOR_NAME: ${{ secrets.GIT_USER_NAME }} | ||
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | ||
|
@@ -252,17 +252,33 @@ jobs: | |
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 | ||
with: | ||
gradle-version: wrapper | ||
gradle-home-cache-includes: | | ||
caches | ||
notifications | ||
dependency-check-data | ||
gradle-version: ${{ github.event.inputs.gradle-version || 'wrapper' }} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Setup JFrog CLI | ||
uses: jfrog/setup-jfrog-cli@8fc3d0018a8721b9a797cd7fd97c8e4833f5a3d1 # v3.5.3 | ||
env: | ||
JF_URL: ${{ vars.JF_URL }} | ||
JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} | ||
|
||
- name: Show JFrog Config | ||
run: jfrog config show | ||
|
||
- name: Verify JFrog Connectivity | ||
run: jfrog rt ping | ||
|
||
- name: Setup JFrog NPM Repository | ||
working-directory: solo | ||
run: | | ||
jf npmc --server-id-resolve setup-jfrog-cli-server --server-id-deploy setup-jfrog-cli-server --repo-resolve solo-npm-release --repo-deploy solo-npm-release | ||
echo "::group::JFrog NPM Repository Configuration" | ||
cat .jfrog/projects/npm.yaml | ||
echo "::endgroup::" | ||
- name: Install Semantic Release | ||
run: | | ||
npm install -g [email protected] @semantic-release/[email protected] @semantic-release/[email protected] [email protected] | ||
|
@@ -271,19 +287,24 @@ jobs: | |
- name: Install Dependencies | ||
working-directory: solo | ||
run: npm ci | ||
run: jf npm ci | ||
|
||
- name: Deploy to JFrog Registry | ||
working-directory: solo | ||
if: ${{ github.event.inputs.dry-run-enabled != 'true' && !cancelled() && !failure() }} | ||
run: jf npm publish | ||
|
||
- name: Setup NPM Authentication | ||
working-directory: solo | ||
run: | | ||
# create .npmrc file to publish solo to Github NPM registry | ||
rm -f .npmrc || true | ||
echo '//npm.pkg.github.com/:_authToken=${NPM_TOKEN}' > ".npmrc" | ||
echo '@hashgraph:registry=https://npm.pkg.github.com' >> ".npmrc" | ||
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ".npmrc" | ||
echo '@hashgraph:registry=https://registry.npmjs.org/' >> ".npmrc" | ||
- name: Publish Semantic Release | ||
env: | ||
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
GIT_AUTHOR_NAME: ${{ secrets.GIT_USER_NAME }} | ||
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | ||
|
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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