Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: create an action to release to npm automatically when a new git tag is created #14

Merged
merged 5 commits into from
Oct 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Chris Dickinson <chris@neversaw.us>
  • Loading branch information
mhmd-azeez and chrisdickinson authored Oct 11, 2023
commit 6d2d8775a1784ad8f91d7f99ece7b4b1ea6cc95f
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish package to NPM
on:
push:
tags:
- '*'
- 'v*'

jobs:
build:
Expand All @@ -24,7 +24,7 @@ jobs:
uses: denoland/setup-deno@v1.1.2

- name: NPM install with caching
run: npm install
run: npm ci

- name: Build
run: npm run build
Expand All @@ -37,8 +37,8 @@ jobs:

- name: Update package version
run: |
TAG=$(git describe --tags --abbrev=0)
echo "Latest Git tag: $TAG"
tag="${{ github.ref }}"
tag="${tag/refs\/tags\/v/}"
npm version $TAG --no-git-tag-version --no-commit-hooks

- name: NPM Publish
Expand Down