Skip to content

Commit

Permalink
fix: deploy workflow and fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gil0mendes committed Feb 5, 2021
1 parent c8557bc commit 7671d2d
Show file tree
Hide file tree
Showing 4 changed files with 4,485 additions and 34 deletions.
33 changes: 9 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js 12
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14

- name: Install dependencies
run: npm install
run: npm ci

- name: Semantic Release and Publish to NPM
uses: cycjimmy/semantic-release-action@v2
id: semantic
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/npm
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup GitHub Package Registry
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: 'https://npm.pkg.github.com'
scope: 'pixelmatters'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish To GitHub Package Registry
if: steps.semantic.outputs.new_release_published == 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Push updates to master
if: steps.semantic.outputs.new_release_published == 'true'
run: "git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v${{steps.semantic.outputs.new_release_major_version}}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
Loading

0 comments on commit 7671d2d

Please sign in to comment.