-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f770a98
commit d02aff8
Showing
3 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Deploy to npm | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Only trigger when a version tag (e.g., v1.0.0) is pushed | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Display Git Information | ||
run: | | ||
echo "GITHUB_REF: $GITHUB_REF" | ||
echo "GITHUB_SHA: $GITHUB_SHA" | ||
git log -1 | ||
- name: Get the tag name | ||
id: get_tag | ||
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
|
||
- name: Use the tag name | ||
run: echo "The tag name is $TAG_NAME" | ||
env: | ||
TAG_NAME: ${{ env.TAG_NAME }} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.18.0 | ||
registry-url: 'https://registry.npmjs.org' | ||
scope: '@wireio' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: make lib | ||
|
||
- name: Run make publish | ||
run: make ci-publish | ||
env: | ||
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters