Skip to content

Commit

Permalink
feat: Semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
0xonramp committed Jun 26, 2024
1 parent 8a5f433 commit 20d6ddc
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ on:
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: write
issues: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- run: npm run lint
Expand All @@ -52,3 +52,22 @@ jobs:
# run last - as it alters the block number
# skip as it can't be minted or redeemed with 0x
# - run: npm run test:eth2xfli
publish:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
needs: [build]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --branches main
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18

0 comments on commit 20d6ddc

Please sign in to comment.