Skip to content

Commit

Permalink
fix: add correct publish config and release pipeline, so that correct…
Browse files Browse the repository at this point in the history
… files are published
  • Loading branch information
IamSebastianDev committed Mar 23, 2024
1 parent 6f5336f commit c6d9828
Showing 1 changed file with 34 additions and 16 deletions.
50 changes: 34 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,37 @@ on:
branches: ['main']

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Publish
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
- name: CI setup
run: yarn ci
- name: Publish to NPM
run: yarn run semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: CI checkout
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
- name: CI setup
run: yarn ci
- name: CI build
run: yarn build
- name: Run tests
run: yarn test
publish:
runs-on: ubuntu-latest
needs: ci
steps:
- uses: actions/checkout@v3
- name: Publish checkout
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
- name: Publish setup
run: yarn ci
- name: Publish build
run: yarn build
- name: Publish to NPM
run: yarn run semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c6d9828

Please sign in to comment.