Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit 4855e26

Browse files
committed
adds github actions workflow
1 parent e51e535 commit 4855e26

File tree

2 files changed

+42
-14
lines changed

2 files changed

+42
-14
lines changed

.github/workflows/publish.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and Publish with Node.js v8 via Docker and Semver Tags
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
9+
jobs:
10+
build-and-publish:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 # Fetch all history for accurate tag calculation
18+
19+
- name: Generate and push new semver tag
20+
uses: SOLIDSoftworks/semver-tags@v1
21+
with:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
tag-prefix: ''
24+
default-version: '2.0.0'
25+
incremented-value: 'patch'
26+
add-minor-tag: true
27+
add-major-tag: true
28+
29+
- name: Build and publish using Node.js v8 in Docker
30+
run: |
31+
docker run --rm \
32+
-v "$PWD":/app \
33+
-w /app \
34+
-e NODE_AUTH_TOKEN=${{ secrets.NPM_TOKEN }} \
35+
node:8 \
36+
bash -c "
37+
npm install && \
38+
npm run-script buildmodule && \
39+
npm version ${{ steps.semver.outputs.semantic-version }} --no-git-tag-version && \
40+
npm config set //registry.npmjs.org/:_authToken=\$NODE_AUTH_TOKEN && \
41+
npm publish
42+
"

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)