Skip to content

Commit 88af2f4

Browse files
Merge pull request #261 from xcomponent/updatetogibhutaction
Updatetogibhutaction
2 parents 92f6303 + ec392f0 commit 88af2f4

File tree

4 files changed

+80
-54
lines changed

4 files changed

+80
-54
lines changed

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**' # Toutes les branches
7+
tags:
8+
- '*'
9+
pull_request:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: [18, 20]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: 'yarn'
26+
27+
- name: Install dependencies
28+
run: yarn install
29+
30+
- name: Lint
31+
run: yarn run lint
32+
33+
- name: Test with coverage
34+
run: yarn run test --coverage
35+
36+
- name: Build
37+
run: yarn build
38+
39+
deploy:
40+
runs-on: ubuntu-latest
41+
needs: build
42+
if: startsWith(github.ref, 'refs/tags/')
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- name: Use Node.js 20
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: 20
50+
registry-url: 'https://registry.npmjs.org'
51+
52+
- name: Install dependencies
53+
run: yarn install
54+
55+
- name: Detect tag type (RELEASE or BETA)
56+
id: tag_check
57+
run: |
58+
TAG_NAME="${GITHUB_REF##*/}"
59+
60+
if [[ "$TAG_NAME" == *"-BETA"* ]]; then
61+
echo "Detected BETA release"
62+
echo "tag_type=BETA" >> $GITHUB_OUTPUT
63+
else
64+
echo "Detected RELEASE"
65+
echo "tag_type=RELEASE" >> $GITHUB_OUTPUT
66+
fi
67+
68+
- name: Publish RELEASE
69+
if: steps.tag_check.outputs.tag_type == 'RELEASE'
70+
run: npm publish
71+
env:
72+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
73+
74+
- name: Publish BETA
75+
if: steps.tag_check.outputs.tag_type == 'BETA'
76+
run: npm publish --tag next
77+
env:
78+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
79+

.travis.yml

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

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
[![](http://slack.xcomponent.com/badge.svg)](http://slack.xcomponent.com/)
22
[![npm](https://img.shields.io/npm/v/reactivexcomponent.js.svg)](https://www.npmjs.com/package/reactivexcomponent.js)
33
[![npm](https://img.shields.io/npm/dt/reactivexcomponent.js.svg)](https://www.npmjs.com/package/reactivexcomponent.js)
4-
[![Build Status](https://travis-ci.org/xcomponent/ReactiveXComponent.js.svg?branch=master)](https://travis-ci.org/xcomponent/ReactiveXComponent.js)
54
[![TypeScript](https://badges.frapsoft.com/typescript/love/typescript.png?v=101)](https://github.com/ellerbrock/typescript-badges/)
6-
5+
![CI](https://github.com/xcomponent/ReactiveXComponent.js/actions/workflows/ci.yml/badge.svg)
76

87
## Reactive XComponent API
98
Reactive XComponent is a javaScript client API that allows you to interact with microservices generated with XComponent software.

checkTag.sh

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

0 commit comments

Comments
 (0)