Skip to content

Commit

Permalink
fix(main): release process
Browse files Browse the repository at this point in the history
  • Loading branch information
coratgerl committed May 12, 2024
1 parent da57a36 commit 697f374
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'

- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
registry-url: 'https://registry.npmjs.org'

- run: bun install
- run: bun ci
Expand All @@ -47,6 +49,22 @@ jobs:
fallback: ''
prefix: ${{inputs.package}}-v

# We publish on NPM before releasing on GitHub to avoid releasing a version that is not published
- run: npm publish --access=public --workspace=${{inputs.package}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Create tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{inputs.package}}-${{inputs.newVersion}}',
sha: context.sha
})
- name: Build Changelog
id: githubRelease
uses: mikepenz/[email protected]
Expand Down Expand Up @@ -94,22 +112,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# We publish on NPM before releasing on GitHub to avoid releasing a version that is not published
- run: npm publish --access public --workspace=${{inputs.package}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Create tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{inputs.package}}-${{inputs.newVersion}}',
sha: context.sha
})
- name: Create Release
uses: softprops/action-gh-release@v2
with:
Expand Down
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

0 comments on commit 697f374

Please sign in to comment.