Skip to content

Commit c5125c3

Browse files
authored
switch to 1password secret (#140)
1 parent e93bf29 commit c5125c3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/dotnet.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,20 @@ jobs:
2323
run: dotnet build --no-restore -c Release
2424
- name: Test
2525
run: dotnet test -c Release
26+
- name: Load secret
27+
if: contains( github.ref, 'refs/tags/v' )
28+
uses: 1password/load-secrets-action@v1
29+
with:
30+
# Export loaded secrets as environment variables
31+
export-env: true
32+
env:
33+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
34+
NUGET_TOKEN: "op://DevOps/nuget-push-token/credential"
2635
- name: Push to Nuget if tagged
2736
if: contains( github.ref, 'refs/tags/v' )
2837
run: |
2938
cd ./USFMToolsSharp/bin/Release/ && \
3039
PKG_NAME=$(ls *.nupkg) && \
3140
dotnet nuget push $PKG_NAME -k $NUGET_TOKEN -s https://api.nuget.org/v3/index.json
3241
env:
33-
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
42+
NUGET_TOKEN: ${{ env.NUGET_TOKEN }}

0 commit comments

Comments
 (0)