Skip to content

Commit

Permalink
fix: split release GHA into release and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
bchelkowski committed Oct 17, 2023
1 parent 7dc0a56 commit 3dea513
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish NPM
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Build Package
run: |
npm ci
npm run build
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Build Package
run: |
npm ci
npm run build
- name: Install Dependencies
run: npm ci
- name: Semantic Release
id: release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
extra_plugins: |
@semantic-release/changelog@6
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/changelog",
"@semantic-release/git",
"@semantic-release/github"
Expand Down

0 comments on commit 3dea513

Please sign in to comment.