Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from qpoint-io/adds-new-gh-actions
Browse files Browse the repository at this point in the history
adds new gh action workflows
  • Loading branch information
jonfriesen authored Jan 5, 2024
2 parents 658b39a + 4242ca9 commit 990696e
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build & Test

on:
pull_request:
push:
branches:
- main

jobs:
build:
name: build & test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: 'https://registry.npmjs.org/'

- name: Install Node dependencies
run: npm ci

- name: Run Node build (if present)
run: npm run build --if-present

- name: Run Tests (if present)
run: npm test --if-present
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
push:
tags:
- "v*"

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: 'https://registry.npmjs.org/'

- name: Install Node dependencies
run: npm ci

- name: Update version in package.json
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
npm version $TAG_VERSION --no-git-tag-version
- name: Run Node build (if present)
run: npm run build --if-present

- name: Publish NPM package
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qpoint/replace-content",
"version": "0.2.0",
"version": "0.0.0",
"description": "A Qpoint adapter for replacing content in the response html",
"author": "Tyler Flint <[email protected]>",
"homepage": "https://github.com/qpoint-io/qpoint-replace-content",
Expand Down

0 comments on commit 990696e

Please sign in to comment.