Skip to content

Commit

Permalink
chore: Update release automation
Browse files Browse the repository at this point in the history
* tag alpha builds finally!
* publish live package on release 🚀
  • Loading branch information
eonarheim committed Dec 1, 2023
1 parent b8ec759 commit 1359bcb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ jobs:
- run: echo $alpha_version
- run: npm --no-git-tag-version version $alpha_version
- run: npm publish --tag next
- name: Create Tag
uses: actions/[email protected]
with:
script: |
const {alpha_version} = process.env;
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${alpha_version}`,
sha: context.sha
})
docs:
name: docs
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release to NPM
on:
release:
types: [created]

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }

jobs:
deploy_alpha:
name: Publish npm package
runs-on: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 100
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: npm
- run: npm ci
- run: npm run build
- run: npm run build:esm
- run: npm publish

0 comments on commit 1359bcb

Please sign in to comment.