Skip to content

Commit

Permalink
build script for releasing package
Browse files Browse the repository at this point in the history
  • Loading branch information
dpickett committed Feb 5, 2024
1 parent b9ac900 commit b2baa43
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install asdf & tools
uses: asdf-vm/actions/install@v2
- name: asdf cache
id: asdf-cache
uses: actions/cache@v2
with:
path: ~/.asdf/
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
- name: build
run: yarn build
- run: yarn publish --access public
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit b2baa43

Please sign in to comment.