Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Sep 18, 2023
1 parent df8d976 commit 24a1e38
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
version:
description: The version being published. This should be a valid semver version, such as `1.0.0`.
required: true
default: ''
default: ""
type: string
dry-run:
type: boolean
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:

name: Publish to NPM
runs-on: ubuntu-latest
environment: 'release'
environment: "release"

steps:
- name: Checkout code
Expand All @@ -107,31 +107,3 @@ jobs:
run: npm publish --provenance --tag ${{ needs.configure.outputs.vtag }} ${{ needs.configure.outputs.dry-run }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-gh:
needs:
- configure
- publish-npm # Don't publish to GitHub Packages until publishing to NPM is successfully completed

name: Publish to GitHub Packages
runs-on: ubuntu-latest
environment: 'release'

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

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://npm.pkg.github.com'
cache: npm

- name: Install dependencies
run: npm ci

- name: Publish release to GitHub Packages
run: npm publish --provenance --tag ${{ needs.configure.outputs.vtag }} ${{ needs.configure.outputs.dry-run }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 24a1e38

Please sign in to comment.