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

adds new gh actions workflow #1

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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/mask-urls",
"version": "0.2.0",
"version": "0.0.0",
"description": "A Qpoint adapter for masking URLs behind a reverse proxy",
"author": "Tyler Flint <[email protected]>",
"homepage": "https://github.com/qpoint-io/qpoint-mask-urls",
Expand Down