Skip to content

Commit

Permalink
⚙️ (jfrog-setup): Push lib to jfrog
Browse files Browse the repository at this point in the history
  • Loading branch information
dedsxc committed Sep 5, 2024
1 parent a9b36c3 commit 9b7d8b5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ env:

jobs:
publish:
environment: Production
runs-on: ubuntu-latest
# environment: Production
runs-on: ledgerhq-shared-medium
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4

Expand All @@ -21,11 +25,26 @@ jobs:

- name: build libraries
run: pnpm build

- name: publish

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}

- name: Login to JFrog Ledger
if: steps.changesets.outputs.hasChangesets == 'false'
id: jfrog-login
uses: LedgerHQ/actions-security/actions/jfrog-login@actions/jfrog-login-1

- name: Publish to JFrog Ledger
if: steps.changesets.outputs.hasChangesets == 'false'
env:
NPM_REGISTRY: jfrog.ledgerlabs.net/artifactory/api/npm/ldk-npm-prod-public
NPM_REGISTRY_TOKEN: ${{ steps.jfrog-login.outputs.oidc-token }}
run: |
cat << EOF | tee .npmrc
registry=https://${NPM_REGISTRY}/
//${NPM_REGISTRY}/:_authToken=${NPM_REGISTRY_TOKEN}
EOF
pnpm publish
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@ledgerhq/device-sdk",
"version": "1.0.0",
"private": true,
"license": "MIT",
"scripts": {
"build": "turbo run build",
Expand Down

0 comments on commit 9b7d8b5

Please sign in to comment.