[FOLIO-3192] allow GitHub actions to upload artifacts to FOLIO Nexus Created: 07/Jun/21  Updated: 07/Jun/21  Resolved: 07/Jun/21

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: Jakub Skoczen Assignee: John Malconian
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
blocks FOLIO-3070 Github workflow for Stripes and UI re... Closed
blocks FOLIO-3071 Finalize GA branch build workflow for... Closed
Relates
relates to FOLIO-3067 Replace Jenkins UI and Stripes CI pip... Closed
Sprint: DevOps Sprint 116
Development Team: FOLIO DevOps

 Description   

As captured in the comment section of FOLIO-3070 Closed we are experiencing authentication issues when trying to upload artifacts built with GithubActions.



 Comments   
Comment by John Malconian [ 07/Jun/21 ]

Ankita Sen I was finally able to get authentication to the test Nexus NPM repository working by using the following steps:

      - name: Set up NPM environment for publishing
        if: contains(github.REF, 'master') || contains(github.REF,'main') || contains(github.REF,'malc-test')
        uses: actions/setup-node@v2
        with:
          node-version: ${{ env.NODEJS_VERSION }}
          check-latest: true
          always-auth: true

      - name: Set _auth in .npmrc
        if: contains(github.REF, 'master') || contains(github.REF,'main') || contains(github.REF,'malc-test')
        run: npm config set @folio:registry https://repository.folio.org/repository/npm-folioci-test/ &&  npm config set _auth ${{ env.NODE_AUTH_TOKEN }}
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

      - name: Publish NPM
        if: contains(github.REF, 'master') || contains(github.REF,'main') || contains(github.REF,'malc-test')
        run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

You can see this in action on the 'malc-test' branch of folio-org/stripes-core.

Generated at Thu Feb 08 23:26:18 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.