Skip to content

Commit

Permalink
Implement feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Aug 29, 2023
1 parent a512fe9 commit 9d9ae94
Showing 1 changed file with 4 additions and 32 deletions.
36 changes: 4 additions & 32 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,9 @@ permissions:

env:
NODE_VERSION: 18
CACHE_KEY: '${{ github.ref }}-${{ github.run_id }}-${{ github.run_attempt }}'

jobs:
build:
name: Build Package
runs-on: ubuntu-latest

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

- name: Build package
uses: ./.github/actions/build
with:
node: ${{ env.NODE_VERSION }}

- name: Save build artifacts
uses: actions/cache/save@v3
with:
path: .
key: ${{ env.CACHE_KEY }}

publish-npm:
needs: build # Don't publish to NPM until the package is successfully built

name: 'NPM'
runs-on: ubuntu-latest
environment: release
Expand All @@ -54,11 +32,8 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: npm

- name: Restore build artifacts
uses: actions/cache/restore@v3
with:
path: .
key: ${{ env.CACHE_KEY }}
- name: Install dependencies
run: npm ci --include=dev

- name: Publish release to NPM
run: npm publish
Expand All @@ -83,11 +58,8 @@ jobs:
registry-url: 'https://npm.pkg.github.com'
cache: npm

- name: Restore build artifacts
uses: actions/cache/restore@v3
with:
path: .
key: ${{ env.CACHE_KEY }}
- name: Install dependencies
run: npm ci --include=dev

- name: Publish release to GitHub Packages
run: npm publish
Expand Down

0 comments on commit 9d9ae94

Please sign in to comment.