Skip to content

Commit

Permalink
chore: add npm release action (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderJames committed Aug 1, 2020
1 parent b8df85b commit e5e9933
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@ jobs:
run: |
VERSION=`git describe --tags`
echo "Publishing Version: ${VERSION}"
echo "::set-env name=VERSION::${VERSION}"
npm install
dotnet build
dotnet pack components/AntDesign.csproj /p:PackageVersion=$VERSION -c Release -o publish
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
- name: Publish to npm 馃巵
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
dotnet publish scripts/npm -c Release -o npm-publish
cp ./scripts/npm/package.json ./npm-publish/wwwroot/
cd ./npm-publish/wwwroot/
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
npm version ${{ env.VERSION }}
npm publish

0 comments on commit e5e9933

Please sign in to comment.