CI/CD enginerring #1
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
name: Publish JFrog build to PyPI | |
permissions: | |
# This is required for requesting the OIDC token | |
id-token: write | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: Build version | |
required: true | |
#use-test-pypi: | |
# type: boolean | |
# description: 'DEBUG: upload to test.pypi.org?' | |
# required: true | |
# default: false | |
workflow_call: | |
inputs: | |
version: | |
type: string | |
description: Build version | |
required: true | |
secrets: | |
# Just make all the secrets required to make things simpler... | |
NPMRC: | |
required: true | |
jobs: | |
publish-jfrog-build-to-npm: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Set up JFrog credentials | |
uses: jfrog/setup-jfrog-cli@v4 | |
env: | |
JF_URL: https://aerospike.jfrog.io | |
with: | |
oidc-provider-name: gh-aerospike-clients | |
oidc-audience: aerospike/clients | |
- name: npm rc | |
run: echo "$NPMRC" | base64 --decode > ~/.npmrc | |
env: | |
NPMRC: ${{ secrets.NPMRC }} | |
- name: npm login | |
run: | | |
npm login --registry=https://aerospike.jfrog.io/artifactory/api/npm/clients-npm-dev-local/ --auth-type=web | |
- name: npm get registry | |
run: | | |
npm get registry | |
- name: npm get publish | |
npm publish --registry=https://aerospike.jfrog.io/artifactory/api/npm/clients-npm-dev-local/ | |
- name: npm install | |
run: | | |
npm install [email protected] | |
#- name: Download JFrog build | |
# run: jf rt dl --build python-client/6.0.3-dev.1 ${{ vars.JFROG_REPO_NAME }} | |
#- name: npm install from JFrog | |
# run: | | |
# jf npm-config --repo-deploy --repo-resolve clients-npm-dev-local | |
# jf npm install --build-name=nodejs-client --build-number=6.0.3-dev.4 | |
# ls . | |
#- run: npm ci | |
#- run: npm publish --provenance --access public | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |