-
Notifications
You must be signed in to change notification settings - Fork 3
113 lines (103 loc) · 3.61 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#
# CHMPX
#
# Copyright 2020 Yahoo Japan corporation.
#
# CHMPX is inprocess data exchange by MQ with consistent hashing.
# CHMPX is made for the purpose of the construction of
# original messaging system and the offer of the client
# library.
# CHMPX transfers messages between the client and the server/
# slave. CHMPX based servers are dispersed by consistent
# hashing and are automatically laid out. As a result, it
# provides a high performance, a high scalability.
#
# For the full copyright and license information, please view
# the license file that was distributed with this source code.
#
# AUTHOR: Takeshi Nakatani
# CREATE: Wed, Nov 18 2020
# REVISION: 1.0
#
#------------------------------------------------------------------------------------
# Github Actions
#------------------------------------------------------------------------------------
name: Node.js AntPickax CI
#
# Events
#
on:
push:
pull_request:
#
# CRON event is fire on every sunday(UTC).
#
schedule:
- cron: '0 15 * * 0'
#
# Jobs
#
jobs:
build:
# [NOTE]
# We plan to update to ubuntu-latest (22.04) soon.
# Right now I am forced to use 20.04 as there are no relevant packages yet.
#
runs-on: ubuntu-20.04
strategy:
#
# do not stop jobs automatically if any of the jobs fail
#
fail-fast: false
matrix:
node-version: [14, 16, 18]
steps:
#
# Checks-out your repository under $GITHUB_WORKSPACE, so your
# job can access it
#
- name: Checkout sources
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
#
# Set environments from secrets
#
# [NOTE] Secrets
# Use Secrets of organization or repository as parameters to
# pass to nodejs_helper.sh for building and packaging, .
#
# The available Secret variables are listed below:
# NODEJS_TYPE_VARS_FILE : specify custom variables file
# * NPM_TOKEN : The token for publishing to npm
# FORCE_PUBLISHER : nodejs major version to publish packages
# USE_PACKAGECLOUD_REPO : true means using pacakgecloud.io repo, false is not using
# PACKAGECLOUD_OWNER : owner name as a pat of path to packagcloud.io for downloading
# PACKAGECLOUD_DOWNLOAD_REPO : repo name as a pat of path to packagcloud.io for downloading
#
# "NPM_TOKEN" is required variable to publish the package.
#
- name: Set environments from secrets
run: |
echo "ENV_NODEJS_TYPE_VARS_FILE=${{ secrets.NODEJS_TYPE_VARS_FILE }}" >> "${GITHUB_ENV}"
echo "ENV_NPM_TOKEN=${{ secrets.NPM_TOKEN }}" >> "${GITHUB_ENV}"
echo "ENV_FORCE_PUBLISHER=${{ secrets.FORCE_PUBLISHER }}" >> "${GITHUB_ENV}"
echo "ENV_USE_PACKAGECLOUD_REPO=${{ secrets.USE_PACKAGECLOUD_REPO }}" >> "${GITHUB_ENV}"
echo "ENV_PACKAGECLOUD_OWNER=${{ secrets.PACKAGECLOUD_OWNER }}" >> "${GITHUB_ENV}"
echo "ENV_PACKAGECLOUD_DOWNLOAD_REPO=${{ secrets.PACKAGECLOUD_DOWNLOAD_REPO }}" >> "${GITHUB_ENV}"
#
# Run building and packaging helper
#
- name: Run building and packaging
run: |
/bin/sh -c "$GITHUB_WORKSPACE/.github/workflows/nodejs_helper.sh -node ${{ matrix.node-version }}"
#
# Local variables:
# tab-width: 4
# c-basic-offset: 4
# End:
# vim600: expandtab sw=4 ts=4 fdm=marker
# vim<600: expandtab sw=4 ts=4
#