Skip to content

Commit

Permalink
Merge pull request #19 from crimeminister/main
Browse files Browse the repository at this point in the history
chore: add github package publish flow
  • Loading branch information
crimeminister authored Jul 29, 2024
2 parents e9f3e3a + 41fb7df commit 10d02e6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/npm-publish-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
# TODO execute tests in headless browser
#- run: npm test

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "svg-credit-card-payment-icons",
"name": "@aaronfagan/ccicons",
"version": "0.1.0",
"description": "SVG Credit Card & Payment Icons",
"main": "src/index.js",
Expand Down

0 comments on commit 10d02e6

Please sign in to comment.