Skip to content

Commit

Permalink
ci: enable publish steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Santeri Elo authored Oct 29, 2020
1 parent 1f92a1d commit e532b86
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1

- name: Build library
uses: actions/setup-node@v1
with:
node-version: 12
- run: |
npm ci
npm run build --if-present
- name: Archive library artifacts
uses: actions/upload-artifact@v2
with:
Expand All @@ -30,16 +33,14 @@ jobs:
uses: actions/download-artifact@v2
with:
name: library
- shell: bash
run: ls -la
#- uses: actions/setup-node@v1
# with:
# node-version: 12
# registry-url: https://registry.npmjs.org/
#- run: npm ci
#- run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish library to npm
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-gpr:
needs: build
Expand All @@ -49,13 +50,11 @@ jobs:
uses: actions/download-artifact@v2
with:
name: library
- shell: bash
run: ls -la
#- uses: actions/setup-node@v1
# with:
# node-version: 12
# registry-url: https://npm.pkg.github.com/
#- run: npm ci
#- run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Publish library to GitHub registry
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit e532b86

Please sign in to comment.