Skip to content

Commit

Permalink
feat: canary and release workflows (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xGorilla authored Oct 2, 2024
1 parent 815d446 commit d247ea4
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Canary release

on: workflow_dispatch

jobs:
canary-publish:
name: Publish Packages (canary)
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
cache: "yarn"

- name: Install Dependencies
working-directory: ./js
run: yarn --frozen-lockfile

- name: Build
working-directory: ./js
run: yarn build

- name: Update version
working-directory: ./js
run: yarn version --new-version "0.0.0-${GITHUB_SHA::8}" --no-git-tag-version

- name: Publish
working-directory: ./js
run: npm publish --access public --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
release:
types: [published]

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
cache: "yarn"

- name: Install Dependencies
working-directory: ./js
run: yarn --frozen-lockfile

- name: Build
working-directory: ./js
run: yarn build

- name: Publish
working-directory: ./js
run: yarn publish --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit d247ea4

Please sign in to comment.