Skip to content

Commit

Permalink
[ci] Add publish github packages action (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
littleGnAl authored Oct 30, 2023
1 parent 59504b0 commit 7ec1f5d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 6,654 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish-github-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish to Github Packages

on:
workflow_dispatch:
pull_request: # Publish if merged to main
types:
- closed
branches:
- main

jobs:
publish:
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: "16.x"
registry-url: "https://npm.pkg.github.com"
# Defaults to the user or organization that owns the workflow file
scope: "@agoraio-extensions"

- name: publish package
if: always()
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install
npm run build
npm publish
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.ccls-cache/
node_modules/
dist/
package-lock.json
Loading

0 comments on commit 7ec1f5d

Please sign in to comment.