Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web3 1188 remove prepare script for package publish #13

Merged
merged 7 commits into from
Nov 1, 2024
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 3 additions & 29 deletions .github/workflows/ci-publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
build-package:
build-and-publish:
runs-on: ubuntu-latest
env:
SEED_PHRASE_1: ${{ secrets.SEED_PHRASE_1 }}
Expand Down Expand Up @@ -36,39 +36,13 @@ jobs:
run: npm run build

- name: Run tests
id: run_tests
rushby marked this conversation as resolved.
Show resolved Hide resolved
run: npm run test

- name: Extract Package Version
id: extract_version
run: echo "package_version=$(node -p "require('./package.json').version")" >> $GITHUB_ENV

- name: Upload build artifacts
id: upload_build
uses: actions/upload-artifact@v4
with:
name: build
path: ./dist

publish-package:
runs-on: ubuntu-latest
needs: build-package

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

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build
path: ./dist
pattern: '**/*'

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Authenticate to npm registry
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -79,7 +53,7 @@ jobs:
run: npm publish

- name: Send Slack Notification for Publish
if: steps.publish.outcome == 'success'
if: ${{ steps.publish.outcome == 'success' }}
uses: slackapi/[email protected]
with:
payload: |
Expand Down