Skip to content

Commit

Permalink
GitHub Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
miikaforma committed Nov 7, 2024
1 parent 90f9408 commit 2244ebd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Package to GitHub Packages
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v3
with:
node-version: '22.x'
registry-url: 'https://npm.pkg.github.com'
cache: yarn
# Defaults to the user or organization that owns the workflow file
scope: '@codecontrol-oy'

- name: Install dependencies 📦️
run: yarn install --immutable

- name: Build 🔨
run: yarn build

- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@codecontrol-oy:registry=https://npm.pkg.github.com
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/kiho/react-form-builder.git"
"url": "git+https://github.com/Codecontrol-Oy/react-form-builder.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"files": [
"lib",
Expand Down

0 comments on commit 2244ebd

Please sign in to comment.