Skip to content

Commit

Permalink
feat: Configure automatic npm publishing (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonko committed Mar 14, 2024
1 parent f4783a3 commit c6420f8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
working-directory: ./blurhasher

- name: Archive built files
run: tar -czvf build.tar.gz -C ./blurhasher dist package.json package-lock.json
run: tar -czvf build.tar.gz -C ./blurhasher dist package.json

- name: Upload build artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -73,8 +73,16 @@ jobs:
name: built-files
path: ./blurhasher

- name: Copy README.md to blurhasher
run: cp README.md blurhasher/README.md

- name: Unpack build artifact
run: tar -xzvf build.tar.gz
working-directory: ./blurhasher

- name: Semantic Release
run: npx semantic-release
working-directory: ./blurhasher
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 9 additions & 2 deletions blurhasher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,22 @@
"placeholder"
],
"files": [
"dist"
"dist",
"README.md"
],
"release": {
"branches": [
"main"
"npm-deploy-config"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
"npmPublish": true
}
],
[
"@semantic-release/github",
{
Expand Down

0 comments on commit c6420f8

Please sign in to comment.