Skip to content

Commit

Permalink
ci: added canary and release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
0xGorilla committed Jan 9, 2024
1 parent f8f1d03 commit da2b9d6
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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
run: yarn --frozen-lockfile

- name: Build
run: yarn build

- name: Update version
run: yarn version --new-version "0.0.0-${GITHUB_SHA::8}" --no-git-tag-version

- name: Publish
run: npm publish --access public --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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
run: yarn --frozen-lockfile

- name: Build
run: yarn build

- name: Publish
run: yarn publish --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@defi-wonderland/natspec-smells",
"version": "1.0.0",
"version": "0.0.1",
"license": "MIT",
"main": "lib/main.js",
"types": "lib/main.d.ts",
Expand Down

0 comments on commit da2b9d6

Please sign in to comment.