Skip to content

Commit

Permalink
Update npm-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ-7885 authored Jul 12, 2021
1 parent 1eb3dfd commit 67d5c2f
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publishing packages to npm and GitHub Packages
on:
# push:
# branches: publish
push:
branches: publish
release:
types: # This configuration does not affect the page_build event above
- created
Expand All @@ -15,8 +15,6 @@ jobs:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
# - run: git config --global user.name ${{ secrets.GIT_NAME }}
# - run: git config --global user.email ${{ secrets.GIT_EMAIL }}
- run: git config --global user.name 'AJ'
- run: git config --global user.email '42003122+code7885@users.noreply.github.com'
# Setup .npmrc file to publish to npm
Expand All @@ -27,28 +25,34 @@ jobs:
registry-url: "https://registry.npmjs.org"
- run: npm install


# - name: Commit files
# run: |
# git config --local user.email "42003122+code7885@users.noreply.github.com"
# git config --local user.name "AJ"
# git commit -m "Add changes" -a
- name: Bump up the patch version 🕹️ -
run: npm version patch -m " %s " -f
run: npm version patch -m " %$ " -f

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main

- run: git checkout main & git push
# Publish to npm
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v2
with:
registry-url: "https://npm.pkg.github.com"
# Defaults to the user or organization that owns the workflow file
scope: "@aj-7885"
# Publish to GitHub Packages
- run: echo "`jq '.name="@aj-7885/eslint-config-webchannel"' package.json`" > package.json
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - run: git checkout main & git push
# # Publish to npm
# - run: npm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# # Setup .npmrc file to publish to GitHub Packages
# - uses: actions/setup-node@v2
# with:
# registry-url: "https://npm.pkg.github.com"
# # Defaults to the user or organization that owns the workflow file
# scope: "@aj-7885"
# # Publish to GitHub Packages
# - run: echo "`jq '.name="@aj-7885/eslint-config-webchannel"' package.json`" > package.json
# - run: npm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 67d5c2f

Please sign in to comment.