Skip to content

Commit

Permalink
Web3 1188 single build-publish job (#13)
Browse files Browse the repository at this point in the history
chore: Change to use a single job for the build and publish workflow
  • Loading branch information
rushby authored Nov 1, 2024
1 parent c9cf10a commit ca45b4e
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 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 @@ -42,33 +42,6 @@ jobs:
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 +52,7 @@ jobs:
run: npm publish --ignore-scripts

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

0 comments on commit ca45b4e

Please sign in to comment.