Fixes Publishing Pipeline for GitHub

This commit is contained in:
James Ives 2020-05-16 18:11:24 -04:00
parent 44b3ce1d39
commit 8945e5d754
3 changed files with 19 additions and 10 deletions

View File

@ -2,6 +2,7 @@ name: publish-to-npm
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
@ -11,21 +12,24 @@ jobs:
ref: dev
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
- uses: actions/setup-node@v1.4.2
with:
node-version: 12
node-version: '10.15.1'
registry-url: 'https://registry.npmjs.org'
scope: '@jamesives'
- name: Configure git
run: |
git config user.email "iam@jamesiv.es"
git config user.name "James Ives"
- run: npm install
- run: npm run-script build
- name: Install Yarn
run: npm install -g yarn
- run: yarn install --frozen-lockfile
- run: yarn build
- run: npm version patch -m "Release %s 📣"
- run: git push
- run: npm ci
# Publish to npm
- run: npm publish --access public
@ -33,11 +37,16 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v1
- uses: actions/setup-node@v1.4.2
with:
node-version: 12
registry-url: 'https://npm.pkg.github.com'
scope: '@JamesIves'
scope: '@jamesives'
- name: Authenticate with the GitHub Package Registry
run:
echo "//npm.pkg.github.com:_authToken=${{ secrets.GITHUB_TOKEN }}" >
~/.npmrc
# Publish to GitHub Packages
- run: npm publish

View File

@ -1,6 +1,6 @@
<p align="center">
<a href="https://github.com/marketplace/actions/deploy-to-github-pages">
<img width="150px" src="./assets/icon.png">
<img width="150px" src="https://github.com/JamesIves/github-pages-deploy-action/raw/dev/assets/icon.png">
</a>
</p>
@ -35,7 +35,7 @@
</p>
<p align="center">
<img src="./assets/screenshot.png">
<img src="https://github.com/JamesIves/github-pages-deploy-action/raw/dev/assets/screenshot.png">
</p>
## Getting Started :airplane:

View File

@ -1,5 +1,5 @@
{
"name": "github-pages-deploy-action",
"name": "@jamesives/github-pages-deploy-action",
"description": "GitHub action for building a project and deploying it to GitHub pages.",
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)",
"version": "3.5.1",