Skip to content

Commit

Permalink
switch to 1password secret (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
danparisd authored Jan 25, 2024
1 parent e93bf29 commit c5125c3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,20 @@ jobs:
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test -c Release
- name: Load secret
if: contains( github.ref, 'refs/tags/v' )
uses: 1password/load-secrets-action@v1
with:
# Export loaded secrets as environment variables
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
NUGET_TOKEN: "op://DevOps/nuget-push-token/credential"
- name: Push to Nuget if tagged
if: contains( github.ref, 'refs/tags/v' )
run: |
cd ./USFMToolsSharp/bin/Release/ && \
PKG_NAME=$(ls *.nupkg) && \
dotnet nuget push $PKG_NAME -k $NUGET_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
NUGET_TOKEN: ${{ env.NUGET_TOKEN }}

0 comments on commit c5125c3

Please sign in to comment.