Skip to content

Commit

Permalink
add release job
Browse files Browse the repository at this point in the history
Signed-off-by: Augustin Husson <[email protected]>
  • Loading branch information
Nexucis committed Jul 16, 2024
1 parent d961dd5 commit a42a7b8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,33 @@ jobs:
- run: npm ci
- run: npm run build
- run: npm run build:cjs
- name: store dist folder
uses: actions/upload-artifact@v4
with:
name: dist
path: |
./dist
!node_modules
release:
name: "release"
needs: "build"
if: ${{ github.event.release.tag_name }}
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup npm environment
uses: ./.github/actions/setup
env:
# The setup-node action writes an .npmrc file with this env variable
# as the placeholder for the auth token
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Download dist folder
uses: actions/download-artifact@v4
with:
name: dist
- run: npm publish . --access public
test:
name: "test"
runs-on: ubuntu-latest
Expand All @@ -39,4 +66,4 @@ jobs:
- name: setup npm environment
uses: ./.github/actions/setup
- run: npm ci
- run: npm run lint
- run: npm run lint
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ tsconfig.cjs.json
tsconfig.json
.eslintrc.json
.circleci/
.github/

0 comments on commit a42a7b8

Please sign in to comment.