fix: create-release workflow checkout order #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release & Publish To NPM | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
checks: | |
uses: ./.github/workflows/_checks.yml | |
create-release: | |
# prevents this action from running on forks | |
if: github.repository == 'cswkim/discogs-mcp-server' | |
needs: checks | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract release notes | |
id: extract-release-notes | |
uses: ffurrer2/extract-release-notes@v2 | |
- uses: ncipollo/release-action@v1 | |
with: | |
body: ${{ steps.extract-release-notes.outputs.release_notes }} | |
publish: | |
# prevents this action from running on forks | |
if: github.repository == 'cswkim/discogs-mcp-server' | |
runs-on: ubuntu-latest | |
needs: create-release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js and pnpm | |
uses: ./.github/actions/setup-pnpm | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm run build | |
- name: Publish to npm | |
run: pnpm publish --access public --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |