Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nckrtl committed Nov 27, 2023
1 parent b869197 commit 8aa6015
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish package to GitHub Packages
on:
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: oven-sh/setup-bun@v1
with:
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@nckrtl'
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Nick Retel"
- run: export NPM_TOKEN="${{ secrets.NPM_TOKEN }}" && bun install
- run: export NPM_TOKEN="${{ secrets.NPM_TOKEN }}" && bun build && npm publish --new-version ${{ github.ref_name }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run tests
on: [pull_request]
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: oven-sh/setup-bun@v1
with:
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@nckrtl'
- name: Install Dependencies
env:
BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: bun install && bun build

0 comments on commit 8aa6015

Please sign in to comment.